(also known as C:\progra~1 in older Windowses)

Short answer: /bin or /usr/bin.

Longer answer: It depends on the distro (Ubuntu, Slack, Arch, Mint, Puppy, etc) and on what kind of program. You could think of these directories as decreasing from user land toward the bare-metal computer level. (Roughly / sort-of / not exactly.)

  • /opt/ (programs you download)
  • /bin/ (netstat, uname, wc, zcat, rm, rmdir, gzip, head, tail, last, ln, ls, kill, gawk, sleep, sort, tar, touch, vi, cat, chmod, sh, bzip2, bash, dmesg)
  • /usr/bin/ (lpr, xsane, zipgrep, xrandr, xsane, less, leafpad, ldd, xinit, dpkg, ssh, sudo, sftp, dvipdf, evince)
  • /usr/sbin/ (gtkdialog, parted, wpa_supplicant, ethtool, nscd, grub, dhcpd, httpd, cupsd, alsaconf)
  • /sbin/ ( fsck, fdisk, mount, swapon, ifup, sysctl, lspci)

You should preferably store programs you download in:

  • /opt/.

(for optional) and add /opt/ or /opt/bin/ to your $PATH with

  • echo $PATH
  • export PATH=$PATH:/opt
  • echo $PATH

(if that gives you an error you may need to give yourself access with chown or chmod. For example chown isomorphismes /opt/ or chmod -R a+rw /opt/.

If you want to find where some command or program you use is located, use which.

# which ls

# which grep

# which top

# which java

# which ghci

# which ruby

# which python

# which perl

# which jwm

# which awesomewm

# which xinit

# which latex

# which pdflatex

# which dvips

# which sage

# which ack-grep

# which ack

# which gdb

# which epdfview

# which dpaste

# which lein

# which less

30 notes

  1. fingers-voice-heart-shake-shake reblogged this from isomorphismes
  2. makgregory reblogged this from isomorphismes
  3. redcloud said: I often make a ~/bin for stuff specific to my user.
  4. lostnotgone reblogged this from isomorphismes
  5. sgdfx30 said: id argue that the short answer should be /usr/bin
  6. isomorphismes posted this