Linux refers to the family of Unix-like computer operating systems using the Linux kernel. If your question is about a certain distribution only, use a more specific tag.

learn more… | top users | synonyms

70
votes
2answers
7k views

Is “ps -u” Really a Bad Syntax?

IMHO ps -u shows a very useful output, much better than ps -u $USER: $ ps -u Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ USER PID %CPU %MEM VSZ RSS TTY ...
68
votes
17answers
74k views

Linux utility for finding the largest files/directories [on hold]

I'm looking for a program to show me which files/directories occupy the most space, something like: 74% music \- 60% music1 \- 14% music2 12% code 13% other I know that it's possible in KDE3, but ...
68
votes
5answers
57k views

Recursively count all the files in a directory [duplicate]

Possible Duplicate: How can I count the number of folders in a drive using Linux? I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, ...
68
votes
2answers
50k views

Finding the process that is using a certain port in Linux

I'd like to be able to find out which process is currently using a certain port in Linux. Is there any way to do this?
65
votes
6answers
4k views

How do I perform commands in another folder, without repeating the folder path?

Is there a clever way to do copy and move operations or a command to duplicate a file, without having to do a cd, then mv after, at the same folder? For example, I have to run the following: mv ...
65
votes
7answers
22k views

What is the difference between executing a bash script and sourcing a bash script?

What is the difference between executing a bash script like A and sourcing a bash script like B? A >./myscript B >source myscript
64
votes
13answers
11k views

How is Linux not prone to viruses, malware and those kinds of things?

How is Linux protected against viruses? This question was a Super User Question of the Week. Read the blog entry for more details or contribute to the blog yourself
63
votes
9answers
181k views

What is the Linux command to find out hardware info?

I need to find out hardware information for the below items under Linux: CPU (and cores) CPU speed Memory Hard disks OS version Any advice?
63
votes
7answers
104k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
62
votes
5answers
6k views

What are the functions of the BIOS while the operating system is running?

I always wondered whether the BIOS (apart from conducting POST, starting the bootloader and passing control to the OS after one presses the power button) has any purpose or function while the ...
61
votes
4answers
5k views

Why would you `cat /dev/null > /var/log/messages`?

On this bash scripting example page the author presents this script: # Cleanup # Run as root, of course. cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Log files cleaned up." ...
61
votes
8answers
32k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
61
votes
3answers
78k views

How to install local .deb packages with apt-get

Is there a way to install packages store on your HD with apt-get, like a "apt-get install ./package.deb ? If not how to handle the dependencies in a very very easy way.
60
votes
7answers
54k views

What to do when Ctrl + C can't kill a process?

Ctrl + C doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor and can't do much else. ...
59
votes
3answers
153k views

What is the difference between i686 and x86_64?

I have an AMD Turion and do not know what to choose between these two versions to install Arch Linux. Thank you.
58
votes
13answers
6k views

Is Unix not a PC operating system? [closed]

I am doing my bachelor's degree at a university. In a written assignment, the professor posted the task: "Name three PC operating systems". Well, I went on an included a variety of OSes (Linux, ...
56
votes
4answers
96k views

How to remove a symbolic link to a directory?

I made a symbolic link with the following commmand: ln -s ../test5 I want to remove it now but my rm fails: $ rm -Rf test5/ rm: cannot remove `test5/': Not a directory $ rm test5/ rm: cannot ...
54
votes
4answers
87k views

Permissions on private key in .ssh folder?

I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time. What should my permissions be on my id_rsa file to ...
53
votes
4answers
4k views

Is a file system just the layout of folders?

I have used Windows since childhood, and when I hear the phrase "Windows filesystem" I think of directories (folders) within directories, a folder called SYSTEM, a folder called PROGRAM FILES etc. Is ...
53
votes
3answers
88k views

How can I determine what process has a file open in Linux?

I'd like to determine what process has ownership of a lock-file. The lock-files are simply a file with a specific name that has been created. So, how can I determine what process has a particular ...
53
votes
11answers
66k views

Automatically mount external drives to /media/LABEL on boot without a user logged in?

This question is similar, but kind of the opposite of what I want. I want external USB drives to be mounted automatically at boot, without anyone logged in, to locations like /media/<label>. I ...
53
votes
2answers
38k views

What is the difference between yum, apt-get, rpm, ./configure && make install?

I am new to Linux and am running CentOS. I have come across four ways to update or install software. So far, I've seen: yum install [program] apt-get install [program] rpm -i [program].rpm wget ...
52
votes
4answers
3k views

How does /proc/* work?

There are many files in /proc, like /proc/cpuinfo, /proc/meminfo, /proc/devices and so on, which, when opened, return system information. These files do not seem to have any existence in reality, as ...
51
votes
10answers
52k views

Remove a certain line from Bash history file

How can I remove a certain line from history's database?
51
votes
5answers
2k views

How to “unextract” a zip file?

I extracted a zip file into a non-empty folder. The zip file has lots of files and a deep hierarchy, that merged with the existing tree of the target directory. How can I remove the files and ...
50
votes
15answers
44k views

Untar, ungz, gz, tar - how do you remember all the useful options?

I am pretty sure I am not the only one with the following problem: every time I need to uncompress a file in *nix I can't remember all the switches, and end up googling it, which is surprizing ...
50
votes
3answers
55k views

How to find the executable files under a certain directory in linux?

How to find the executable files under a certain directory in linux?
49
votes
6answers
112k views

Test if a port on a remote system is reachable (without telnet)

In the old days, we used telnet to see if a port on a remote host was open: telnet hostname port would attempt to connect to any port on any host and give you access to the raw TCP stream. These ...
49
votes
12answers
63k views

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified? Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): ...
49
votes
12answers
55k views

How to start GUI linux programs from the command line, but separate from the command line?

I've searched for this before, but have never been able to find an answer. In Windows, if I have a console window open, type winmine, and press enter, Minesweeper will appear, completely separate ...
49
votes
16answers
66k views

How to synchronize the home folder between multiple computers?

I have three computers at home, and would like to have the /home/ folder tree synchronized between the three. Any files/folders (except those hidden) that are modified/added/removed in one of the ...
48
votes
8answers
2k views

How do you configure a Windows machine for a Linux user? [closed]

How do you configure a Windows (preferably latest version) machine for a Linux power user, so that s/he can get most out of it?
48
votes
8answers
10k views

Cross-platform file system

I would like my external drives to be readable and writable from Linux, Mac OS X and Windows. FAT32 works, but the 4 GB file size limit is a showstopper these days. Are there any alternatives?
48
votes
5answers
69k views

How to check which timezone in Linux?

Is there a way to check which time zone I'm currently in on Linux?
48
votes
4answers
16k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
47
votes
4answers
54k views

How to specify level of compression when using tar -zcvf?

I gzip directories very often at work. What I normally do is tar -zcvf file.tar.gz /path/to/directory Is there a way to specify the compression level here? I want to use the best compression ...
47
votes
5answers
142k views

Checking what PHP version I'm running on Linux?

I'm running Centos 5 and I need to know what version of PHP I'm running, is there a command for this which I can run?
47
votes
3answers
81k views

How to make new file permission inherit from the parent directory?

I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
47
votes
8answers
67k views

How can I tunnel all of my network traffic through SSH?

Whenever I'm using the internet from an insecure location (such as public wifi) I like to use an ssh tunnel (ssh -D port host) to ensure my traffic can't be sniffed. Unfortunately, there seem to be ...
46
votes
8answers
26k views

How can I open a file read-only from command line with emacs/vi/vim

Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode or read-only. I know how to open a file as read only if emacs/vi/vim is already running.
46
votes
9answers
61k views

How do I add a user to multiple groups in Ubuntu?

What's the command line utility and the arguments it requires?
46
votes
1answer
7k views

If I buy a computer with Windows 8 and Secure Boot, will I still be able to install Linux?

I've heard a lot about how Microsoft is implementing UEFI Secure Boot in Windows 8. Apparently it prevents "unauthorized" bootloaders from running on the computer, to prevent malware. There's a ...
46
votes
3answers
32k views

What does load average mean in unix/linux?

If I run uptime, I get something like this: 10:50:30 up 366 days, 23:27, 1 user, load average: 1.27, 2.06, 1.54 What do those numbers on the end mean? The man page tells me it's "the load ...
45
votes
7answers
38k views

How to throttle bandwidth on a Linux network interface?

Is there a way to constrain the bandwidth on a NIC in linux? I'd like to be able to simulate an arbitrarily slow connection.
44
votes
11answers
9k views

What is the relationship between Unix, Linux, Ubuntu, Debian and Android?

What is the relationship between Unix, Linux, Ubuntu, and Debian? I suspect they are all Operating Systems that are based upon one another - similar to how Windows is based on DOS. Is my suspicion ...
43
votes
4answers
39k views

How can I avoid SSH's host verification for known hosts?

I get the following prompt everytime I try to connect a server using SSH. I type "yes", but is there a way to aovid this? The authenticity of host '111.222.333.444 (111.222.333.444)' can't be ...
43
votes
5answers
102k views

What is this dm-0 device?

While poking around trying to figure out why a Linux -> Linux file transfer is running slower than I think it should, I stumbled across something I'm not familiar with. /dev/dm-0 seems to be my ...
43
votes
12answers
105k views

How to recover a removed file under Linux?

By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?
42
votes
6answers
57k views

How to list folders using bash commands?

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
42
votes
6answers
22k views

Better Ubuntu Fonts

I have been using Ubuntu for a while. I like it. I like it a lot. But once in a while, when I switch to Windows, I feel better because I really like the font. It feels really much pleasant to watch ...