(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 $PATHexport PATH=$PATH:/optecho $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 /bin/ls # which grep /bin/grep # which top /usr/bin/top # which java /usr/bin/java # which ghci # which ruby /usr/bin/ruby # which python /usr/bin/python # which perl /usr/bin/perl # which jwm /usr/bin/jwm # which awesomewm # which xinit /usr/bin/xinit # which latex /usr/bin/latex # which pdflatex /usr/bin/pdflatex # which dvips /usr/bin/dvips # which sage # which ack-grep /usr/bin/ack-grep # which ack # which gdb /usr/bin/gdb # which epdfview /usr/bin/epdfiew # which dpaste /opt/dpaste # which lein /opt/lein # which less /usr/bin/less

