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

61
votes
13answers
10k 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
61
votes
2answers
44k 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?
60
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 ...
59
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." ...
59
votes
6answers
31k views

Automatically answer 'Yes' when using apt-get install

Is there a way to make apt-get install answer "yes" to the "Do you want to continue [y/N]?"?
58
votes
9answers
167k 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?
57
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
6answers
91k 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 ...
56
votes
6answers
18k 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
55
votes
5answers
46k 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, ...
54
votes
9answers
59k views

How to clear the contents of a file from the command line?

I have a log file that has a bunch of stuff in it that I don't need anymore. I want to clear the contents. I know how to print the contents to the screen: cat file.log I know how to edit the file, ...
54
votes
8answers
27k 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 ...
52
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 ...
51
votes
3answers
135k 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.
51
votes
7answers
46k 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. ...
51
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
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
3answers
78k 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 ...
50
votes
4answers
87k 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 ...
49
votes
3answers
66k 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.
49
votes
10answers
63k 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 ...
48
votes
15answers
42k 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 ...
46
votes
12answers
52k 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 ...
46
votes
3answers
15k 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 ...
46
votes
3answers
49k 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?
46
votes
2answers
31k 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 ...
45
votes
8answers
2k views

How do you configure a Windows machine for a Linux user?

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?
45
votes
1answer
6k 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 ...
45
votes
3answers
74k 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 ...
44
votes
4answers
74k 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 ...
44
votes
12answers
55k 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): ...
44
votes
16answers
58k 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 ...
43
votes
4answers
47k 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 ...
43
votes
8answers
9k 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?
43
votes
8answers
61k 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 ...
43
votes
3answers
29k 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 ...
42
votes
9answers
44k views

Remove a certain line from Bash history file

How can I remove a certain line from history's database?
42
votes
6answers
20k 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 ...
41
votes
9answers
3k views

Why is Bash everywhere (in most if not all Linux distributions)?

Bash is used by default in every Linux distribution I have tried, over alternatives like Z shell (zsh). Is there a technical or historical reason for this?
41
votes
11answers
7k views

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

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 ...
41
votes
6answers
51k 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 )
41
votes
7answers
36k 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.
40
votes
8answers
23k 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.
40
votes
2answers
5k views

what is the difference between “command && command” and “command ; command”

I see these two usage on Ubuntu "command && command" and "command ; command", e.g. apt-get update && apt-get upgrade What would differ if I use apt-get update; apt-get upgrade? I ...
40
votes
4answers
93k 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 ...
40
votes
12answers
95k 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?
39
votes
4answers
34k 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 ...
39
votes
7answers
44k views

What's the easiest way to sniff TCP traffic data on Linux?

I want a simple way to show all the TCP data (not the TCP headers or anything else) going over any interface on my Linux box. For instance, I want a magical command that if I do: ...
39
votes
9answers
55k views

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

What's the command line utility and the arguments it requires?
39
votes
7answers
7k views

Linux equivalent of Windows Registry

What is the Linux equivalent of Windows Registry? If there is no equivalent or similar structure in Linux, how are the things that are done by the Windows Registry handled in Linux?