Linux – Definitions and Commands

:term: FHS – File system layout (default folder layout)
:term: mounts – locations where storage devices are allowed to reside (:locations: [‘/boot’, ‘/usr’, ‘/var’, ‘/home’])


still to be listed:
history, time, type, stream, pipe, redirect, STDOUT, STDERR, STDINPUT, mail, tee, xargs, head, tail, cat, fmt, pr, expand, convert, join, paste, nl, sed, sort, split, uniq, wc, …

:cmd: ls
:desc: list directory contents
:options: [‘-a’, ‘-l’, ‘-h’, ‘-t’]
:example: ls [OPTION]… [FILE]…
:usage: $ ls -alht
:usage-desc: list all + long format + human + sortby newest first

:cmd: hier
:desc: shows FHS folder hierarchy
:usage: $ man hier

:cmd: dpkg
:desc: -L shows where the files are installed in your system
:example: dpkg -L <package name>
:usage: $ dpkg -L python3.4

Finding Stuff
:cmd: find
:desc: Searches the specified folder structure, which means it is accurate, but can be very slow.
:options: [‘-name’, ‘-user’, ‘-xtype’, ‘-amin’, ‘perm’]
:usage1: $ find / -name “passwd”
:usage1-desc: searches for a file named “passwd”
:usage2: $ find / -perm /4000
:usage2-desc: searches with permission 4000

:cmd: locate
:desc: is a local operating system database lookup, which means its faster than “find”, however like all single instance databases can be out of date. A manual update can be forced by using “updatedb”.
:usage: $ locate <filename>

:cmd: whereis
:desc: Search based on binary, source, and man pages
:usage: $ whereis ‘passwd’

:cmd: which
:desc: Search based on binaries only
:usage: $ which <package>

:cmd: ps
:desc: report a snapshot of the current processes
:usage1: ps -aug | grep http
:usage1-desc: display the current “http” processes
:usage2: ps -augfx
:usage2-desc: display all running processes in detail

:cmd: ln

:cmd: cal

:cmd: wall

:cmd: du
:desc: displays size of current folder
:options: (of interest) [‘-L’, ‘-l’, ‘–inodes’, ‘-h’, ‘-s’, ‘–total’, ‘–bytes’,’–all’]
:usage: du -hs
:usage-desc: human readable + summarize

Shell Environment

:cmd: env
:desc: displays the current environment variable available in memory
:usage: $ env

:cmd: uname
:desc: print system information
:options: [‘-a’, ‘-s’, ‘-n’, ‘-r’, ‘-v’, ‘-m’, ‘-p’, ‘-i’, ‘-o’]
:usage: $ uname -a

:cmd: echo
:desc: display a line of text
:options: [‘-n’, ‘-e’, ‘-E’]
:usage: $ MYDIR = /usr ; echo $MYDIR ;
:usage-desc: sets the folder “/usr” to the variable MYDIR, then echo calls that variable with a “$” in front of it.

:cmd: bash

:cmd: help

:cmd: set
:desc: Set or unset values of shell options and positional parameters.
:options: set [-abefhkmnptuvxBCHP] [-o option-name] [–] [arg …]
:usage: $ set ; help set | less ; unset ;


  • /boot – all for boot
  • /dev – interfaces to devices
  • /etc – config files (ascii file type)
  • /usr – profile files
  • /sbin – binaries for super users
  • /bin – binaries for all users
  • /lib – 32bit library files for programs
  • /lib64 – 64bit library files for programs
  • /home – where user profiles and some mounts might live
  • /mnt – manual mounts
  • /media – auto mounts
  • /opt – optional
  • /proc – interface to the kernal!
  • /run – info about running processes
  • /srv – services doc locations
  • /sys – interface to hardware
  • /tmp – auto trash
  • /usr/local – my toolset would go here
  • /usr/share – everyone
  • /usr/src – source code
  • /var – filled with processes that are running, logs, databases, doc root…

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s