9

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

Álvaro
  • 183
  • 4
  • 10

10 Answers10

8

Try commandlinefu.com.

Node
  • 1,644
  • 1
  • 13
  • 15
7

'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

jrg
  • 219
  • 3
  • 12
Jacob Hume
  • 173
  • 1
  • 1
  • 7
3

Slight dupe:

Hidden Features of Linux

Hidden Features of Linux

2
raspi
  • 811
  • 1
  • 9
  • 21
2

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

dsully
  • 21
  • 1
2

find. Extremely useful in combination with xargs.

Zifre
  • 439
  • 1
  • 6
  • 11
2

reset

for when you accidentally cat a binary file :-)

Cheers

HTTP500
  • 4,827
  • 4
  • 22
  • 31
1

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

  • 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 '12 at 05:12
0

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

thinice
  • 4,676
  • 20
  • 38
0

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.

hookenz
  • 14,132
  • 22
  • 86
  • 142