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

1240
votes
7answers
133k views

How do I make a machine “blank screen” for a period of time (as a penalty) if certain noise levels are reached?

My kids (4 and 5) yell a lot when playing games on the computer. I found an effective cure for this. When I hear loud noises, I ssh into the game computer and do: chvt 3; sleep 15; chvt 7 This ...
326
votes
6answers
202k views

How can I sort the output of 'ls' by last modified date?

How can I sort the output of ls by last modified date? I can't find the answer on Google without digging around, an there is no answer on Stack Overflow either.
156
votes
17answers
12k views

What is the advantage of using 'tar' today?

I know that tar was made for tape archives back in the day, but today we have archive file formats that both aggregate files and perform compression within the same logical file format. Questions: ...
136
votes
7answers
7k views

What do the parentheses and number after a Unix command or C function mean?

I keep seeing parentheses and a number after a command in Unix or Linux or C function. For example: man(8), ftok(2), mount(8), etc. What do these mean? I see them in man too.
129
votes
4answers
274k views

How to find a directory on linux?

I have a VPS with Suse Linux 10.3. I've logged in via SSH/putty and am trying to find where my web files are located. Since I'm uploading via FTP in a directory called httpdocs, I assume that this ...
119
votes
9answers
12k views

I accidentally typed password into bash command line

I accidentally typed my password into bash command line, mistaking the Last login: ... line for Wrong password (I was in a hurry). What do I do to cover my trace? What I did was editing .bash_history ...
116
votes
6answers
78k views

How to chmod 755 all directories but no file (recursively)?

How to chmod 755 all directories but no file (recursively) ? Inversely, how to chmod only files (recursively) but no directory ?
105
votes
8answers
8k views

What is the danger of inserting and browsing an untrusted USB drive?

Suppose someone wants me to copy some files to their USB stick. I'm running fully-patched Windows 7 x64 with AutoRun disabled (via Group Policy). I insert the USB drive, open it in Windows Explorer ...
105
votes
5answers
8k views

How do identify whether my Linux computer was hacked?

My home PC is usually on, but the monitor is off. This evening I came home from work and found what looks like a hack attempt: in my browser, my Gmail was open (that was me), but it was in compose ...
102
votes
6answers
79k views

What is the “You have new mail” message in Linux/UNIX?

Sometimes, when I log into a box and 'su' to root, I get a cute little message saying I have mail (thank GOD it's not AOL). Where is this mail? What does it contain? Who/What sent it? How important ...
100
votes
13answers
150k views

How can I download an entire website?

How can I download all pages from a website? Any platform is fine.
98
votes
11answers
70k views

How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy. However, I'm struggling with how to completely detach a ...
92
votes
3answers
20k views

How to turn off word-wrap in less

Short version: How can I make the less utility in Linux not wrap lines? Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first ...
82
votes
4answers
28k views

Why does Ctrl + V not paste in Bash (Linux shell)?

When I copy something to the clipboard and press Ctrl + V in Bash, nothing happens; However, right clicking and selecting Paste does the job. Why? Is there any reasonable issue (I'm sure there is) ...
79
votes
7answers
5k views

How can I create a file with a specific size from a command line?

How can I create a file (e.g. using the touch command or another similar way), but with a specific size (e.g. 14 MB)? The use case is to test FTP with various file sizes. If we can create a file with ...
78
votes
13answers
35k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
77
votes
5answers
34k views

Which linux filesystem works best with SSD

From wiki: The vital TRIM function is supported by the Linux OS starting with 2.6.33 kernel (available early 2010). However, support amongst various filesystems is still inconsistent or not present. ...
75
votes
2answers
48k views

Go back to previous directory in shell

Is there a way to go back to previous directory we were in using bash,tcsh without using pushd/popd ? I'd like to type something like "back" and got returned to the previous directory I was in. Edit: ...
73
votes
12answers
33k views

Undo an “rm -rf ~” command?

I had a folder I didn't want named '~', so from the command line I typed rm -rf ~ and accidentally deleted my home folder (since ~ resolved to /home/username). Is there any way back or do I ...
73
votes
6answers
54k views

How do you gunzip a file and keep the .gz file?

The default behavior of gunzip is to delete the .gz file after it decompresses. How do I prevent it from deleting the file?? If this functionality is not included then is there an alternative ...
72
votes
6answers
94k views

How to get the summarized sizes of folders and their subfolders?

Let's say I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system ...
70
votes
5answers
216k views

How to install the real Firefox on Debian?

Debian 6 ("Squeeze") uses a rebranded version of Firefox called Iceweasel. It, however, lacks plugin support, and most of my favorites don't work. So what is best way to install the "real" Firefox on ...
69
votes
5answers
61k views

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to ...
68
votes
6answers
70k views

How to check which apache modules are enabled/installed?

which is the most elegant way to check which apache modules are enabled?
67
votes
14answers
20k views

How to delete all files in a directory except some?

I need to delete all files in a directory, but exclude some of them. For example, in a directory with the files a b c ... z, I need to delete all except for u and p. Is there an easy way to do this?
66
votes
10answers
150k views

How do I get an entire directory in sftp?

I'm just learning to use sftp, and I want to copy a directory from the remote computer to my local computer. If I try get [directory] it gives me this error: Cannot download non-regular file: ...
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
5answers
78k views

How do I find out what version of Linux I'm running?

Is there a way to determine what version (distribution & kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system?
65
votes
5answers
26k views

Aptitude vs. apt-get: Which is the recommended (aka the “right”) tool to use?

Some time ago I read that aptitude is the preferred tool for installation on Debian-based systems. But when you search around on how to administer a Debian-based system, then aptitude is rarely ...
64
votes
6answers
153k views

How can I give write-access of a folder to all users in linux?

I installed apache2 on Ubuntu just now, and noticed that the /var/www folder is protected. I can just sudo everything but I would rather just give it write access. How can I do this? I tried sudo ...
64
votes
7answers
91k views

How do I compare binary files in Linux?

I need to compare two binary files and get output in form for every different byte. So if file1.bin is 00 90 00 11 in binary form and file2.bin is 00 91 00 10 I want to get something ...
63
votes
11answers
35k views

How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken. If I could at ...
62
votes
4answers
63k views

How can I resume a stopped job in Linux?

How can I resume a stopped job in Linux? I was using emacs and accidentally hit ctrl-z which blasted me back to the console. I can see it when I type 'jobs' [*****]$ jobs [1]+ Stopped ...
62
votes
9answers
28k views

Get colors in 'less'' command

when I read a file in Linux with the command 'less' or 'more', how can I get the content in colors?
62
votes
3answers
27k views

What's the equivalent of Linux's updatedb command for the Mac?

If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the ...
61
votes
6answers
48k views

What does 'source' do?

$ whatis source source: nothing appropriate. $ man source No manual entry for source $ source bash: source: filename argument required source: usage: source filename [arguments] It exists, and it is ...
60
votes
13answers
9k 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
60
votes
11answers
100k views

How to wipe free disk space in Linux?

When a file is deleted, its contents may still be left in the filesystem, unless explicitly overwritten with something else. The wipe command can securely erase files, but does not seem to allow ...
58
votes
5answers
4k 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 ...
56
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, ...
54
votes
10answers
74k views

Linux: How to move all files from current directory to upper directory?

I tried something like mv . .. but it doesn't work.
54
votes
5answers
96k views

How can I list all IPs in the connected network, through Terminal preferably?

Using Ubuntu 10.10, I was wondering if there was a command line command that can list all the IPs of devices connected to the network? I would use this for example, to list all the computers ...
54
votes
2answers
29k 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?
54
votes
3answers
77k views

ps aux output meaning

When typing ps aux, what does each column of the output mean? For example $ ps aux timothy 29217 0.0 0.0 11916 4560 pts/21 S+ 08:15 0:00 pine root 29505 0.0 0.0 38196 2728 ? ...
53
votes
14answers
131k views

How do I figure out which /dev is a USB flash drive?

I want to mount a USB drive, two of them and I need two different mount points. Unfortunately, the Linux kernel underwent a name change and I can't figure out which /dev location is the right one. Is ...
53
votes
12answers
149k views

How do I get Java support on Google Chrome in Linux?

Is there a way to run Linux Google Chrome with Java support?
52
votes
2answers
18k views

Rename screen session

Is it possible to change the name of a GNU screen session? Say I called started it with "screen -S foo" and I want to rename it to bar.
51
votes
4answers
3k 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
4answers
2k 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 ...
50
votes
2answers
47k views

How to convert .ppk key to OpenSSH key *under Linux*?

I know that is possible to convert .ppk under puttygen in Windows, but how to do that on Linux ? Is this possible ?