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

1291
votes
7answers
138k 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 ...
405
votes
7answers
256k 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?
166
votes
6answers
109k 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 ?
165
votes
18answers
14k 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: ...
152
votes
4answers
338k 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 ...
146
votes
8answers
8k 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
9answers
13k 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 ...
120
votes
13answers
200k views

How can I download an entire website?

How can I download all pages from a website? Any platform is fine.
118
votes
8answers
107k 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 ...
116
votes
3answers
26k 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 ...
111
votes
12answers
86k 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 ...
109
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 ...
106
votes
5answers
9k 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 ...
95
votes
7answers
98k views

How to check which apache modules are enabled/installed?

which is the most elegant way to check which apache modules are enabled?
94
votes
17answers
49k 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 ...
92
votes
4answers
41k 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) ...
91
votes
4answers
86k 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 ...
91
votes
2answers
68k 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: ...
88
votes
6answers
128k 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 ...
84
votes
7answers
9k 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 ...
84
votes
10answers
37k 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?
84
votes
5answers
261k 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 ...
83
votes
6answers
79k 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 ...
82
votes
6answers
65k 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 ...
82
votes
5answers
42k 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. ...
81
votes
7answers
8k views

Is it possible to ping an address:port?

I am not into networking, and I have the following question related to the Linux ping command. Can I only ping an address? For example: miner@raspberrypi ~ $ ping onofri.org PING onofri.org ...
81
votes
6answers
104k 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?
80
votes
7answers
117k views

How do I compare binary files in Linux?

I need to compare two binary files and get the output in the form <fileoffset-hex> <file1-byte-hex> <file2-byte-hex> for every different byte. So if file1.bin is 00 90 00 11 in binary ...
78
votes
15answers
35k 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?
78
votes
3answers
32k 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 ...
76
votes
12answers
41k 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 ...
75
votes
10answers
176k 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: ...
75
votes
6answers
182k 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 ...
74
votes
5answers
32k 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 ...
70
votes
3answers
168k views

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

Is there a way to run Linux Google Chrome with Java support?
69
votes
11answers
42k 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 ...
69
votes
3answers
100k 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 ? ...
68
votes
11answers
114k 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 ...
67
votes
14answers
161k 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 ...
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
122k 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 ...
64
votes
3answers
24k 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.
61
votes
2answers
13k views

How to append to a file as sudo? [duplicate]

Possible Duplicate: sudo unable to write to /etc/profile I want to do: echo "something" >> /etc/config_file But, since only the root user has write permission to this file, I can't ...
60
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
60
votes
12answers
85k views

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

How to move all files from current directory to upper directory in linux? I tried something like mv *.*, but it doesn't work.
60
votes
5answers
5k 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 ...
60
votes
2answers
39k 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?
59
votes
2answers
64k 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 ?
58
votes
15answers
63k views

Linux utility for finding the largest files/directories

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 ...
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, ...