Skip to content

Instantly share code, notes, and snippets.

@s4nchez
Last active March 7, 2022 01:22
Show Gist options
  • Save s4nchez/4713057 to your computer and use it in GitHub Desktop.
Save s4nchez/4713057 to your computer and use it in GitHub Desktop.
Command line tools every developer should know

Command line tools every developer should know

Prior reading

  • The Unix philosophy, specially the "Make each program do one thing well" [1]

Basic

  • File and directory navigation/manipulation (ls, cd, mkdir, rm, rmdir, touch, cp, mv)
  • ln/unlink/readlink
  • find/locate
  • chmod
  • chown
  • man/info
  • su/sudo
  • set/export (environment variables in general, specially PATH)
  • which
  • df
  • history

Text editing

  • vi (enough to open/edit/save a file)

Text processing

  • cat
  • head/tail
  • more/less
  • grep
  • awk/sed/cut
  • (regular expression in general)
  • wc
  • diff
  • tr

Streams, pipes and redirects

  • <<
  • |
  • xargs
  • tee

Networking

  • ping
  • netstat
  • ssh/scp
  • ngrep
  • netcat
  • curl
  • wget
  • telnet (mostly for port testing?)
  • rsync
  • lsof (-i)

Processes

  • ps
  • uptime
  • top/htop
  • nohup
  • kill/pkill/killall
  • &
  • (Ctrl + Z)
  • fg/bg/jobs
  • crontab
  • lsof

File archiving and compressing

  • tar (including manipulating gzip/bzip)
  • zip

References

[1] The Art of Unix Programming (http://www.catb.org/esr/writings/taoup/html/ch01s06.html)

Resources

@jredville
Copy link

I'd switch from "vi" to something along the lines of "vi, emacs, nano, or another ubiquitous term based text editor"

@s4nchez
Copy link
Author

s4nchez commented Feb 7, 2013

@jredville the reason I only mention vi is because I'm yet to see a unix box where it's not there. The same does not apply to other editors, so that's why I believe it's essential to know the minimum of vi in case you get to a machine without install privileges.

@s4nchez
Copy link
Author

s4nchez commented Feb 7, 2013

Added more commands (Thanks again, @tomwhoiscontrary).

@amar-sanakal
Copy link

tmux - I think you should add this as well. It's so very handy when working on multiple servers and multiple tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment