As there is a windows version of this question, I decided to open a community wiki for the same question under unix, linux, and the like.

I'll be updating this list with the answers:

  • bash: exec 3<> /dev/tcp/localhost/80 # Redirect to port 80 of localhost
  • find: search for files in a directory hierarchy
  • htop: interactive process viewer, similar to top
  • xargs: build and execute command lines from standard input
  • tmux: detachable, re-attachable command line sessions
  • apropo: find relevant man pages
  • vmstat: See the state of your system

Websites:

  • commandlinefu.com
  • serverfault.com

Keyboard shortcuts: - Ctrl T (BSD specific): send SIGINFO to a running program - Magic SesRq key (Linux specific): en.wikipedia.org/wiki/Magic_SysRq_key

link
See @Andrew Hodgson's response. – gyaresu May 14 '09 at 1:37
Yeah, actually I see it. – Álvaro May 21 '09 at 20:32
feedback

locked by sysadmin1138 Mar 6 at 19:08

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: FAQ.

10 Answers

Try commandlinefu.com.

link
feedback

'screen' - allows for detachable, re-attachable command line sessions. Made extra shiny with screen-profiles (default in Ubuntu 9.04), and byobu in 10.04

link
feedback

Slight dupe:

Hidden Features of Linux

http://serverfault.com/questions/2817/hidden-features-of-linux

link
yeah, I didn't find it – Álvaro May 8 '09 at 13:27
feedback

find. Extremely useful in combination with xargs.

link
But also on its own. – Matthew Flaschen May 9 '09 at 21:29
2  
The use of -exec in find makes xargs useless most of the time. – Raphink Dec 28 '09 at 21:11
feedback

Using 'ack' as a replacement for grep/find+xargs+grep: www.betterthangrep.com

link
feedback

reset

for when you accidentally cat a binary file :-)

Cheers

link
feedback

Maybe not commands per se, but I've found knowing that you can set bash to use emacs or vi-style shortcuts to navigate the prompt to be especially useful. Ctrl+A to move to the beginning of the line, Ctrl+E to move to the end of the line, and all the others (c.f. http://www.hypexr.org/bash_tutorial.php).

link
I know that bash uses emacs style by default, but is it actually possible to have it use vi commands? I'd love that, but I'm not sure how it'd work. (Edit: I just realized how old this is....but ah well. Legit question.) – lunchmeat317 Jan 18 at 5:12
feedback

ls - list directory contents. ls /bin ls /usr/bin ls /usr/local/bin : See what other toys you can play with

link
feedback

pushd, popd - push directory, pop directory

cd - without any parameters will take you back to your home directory.

history - gives a list of all the previous command combinations that were run. You can grep this list if you're looking for something specific. And then use !n to recall it.

link
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.