Basic Linux Commands for µSR

Introduction to ... The Command Line


The "shell" is a program in UNIX or Linux that allows the user to interact with the computer through the keyboard instead of the mouse. It requires opening a "terminal window" where the user's keystrokes are echoed and the shell's responses are displayed as plain ASCII text. The shell interprets the user's commands, takes appropriate action and (usually) returns some response or activates some application program.

There are many "flavors" of shell, as there are of almost every type of software. We will be using the "Bourne again shell" (bash) whose name reflects the humorless seriousness of the Linux community.   :-)

There are a huge number of bash commands, most of which you will not need to know for the TSI workshops. I have made up a short list of the ones you may need to know, and a brief description of each one's use, with a link to its more detailed and official definition given elsewhere.

COMMAND ACTION or MEANING
  alias   Create an alias (a customized command of your own).
  apropos   Search Help manual pages (man -k) without having to know the command you're looking for.
  bash   Run the GNU Bourne-Again SHell (in case you're in some other shell).
  bzip2   Compress or decompress named file(s).
  cd   Change Directory.
  chmod   Change access permissions.
  chown   Change file owner and group.
  clear   Clear terminal screen.
  cp   Copy one or more files to another location.
  df   Display free disk space.
  diff   Display the differences between two files.
  dir   Briefly list directory contents.
  du   Estimate file space usage.
  echo   Display message on terminal screen.
  eject   Eject removable media.
  exit   Exit the shell. Terminal window will close.
  export   Set an environment variable.
  find   Search for files that meet a desired criteria.
  grep   Search file(s) for lines that match a given pattern.
  gzip   Compress or decompress named file(s).
  help   Display help for a built-in command.
  jobs   List active jobs.
  kill   Stop a process from running.
  killall   Kill processes by name.
  less   Display a text file one screen at a time and erase on exit.
  ln   Make links between files.
  locate   Find files anywhere on the system.
  lpr   Send a file to a print queue.
  lprm   Remove jobs from the print queue.
  ls   List information about file(s).
  man   Invoke the help manual.
  mkdir   Create new folder(s).
  more   Display a text file one screen at a time and leave visible.
  mount   Mount a file system.
  msrfft   Invoke the TRIUMF µSR Fast Fourier Transform program.
  msrfit   Invoke the TRIUMF µSR fitting program.
  musrgui   Invoke the Graphical User Interface for musrfit etc.
  mv   Move or rename files or directories.
  nice   Set the priority of a command or job.
  passwd   Modify your login password.
  printenv   Print environment variables.
  ps   Inquire about status of processes.
  pwd   Print Working Directory. ("Where am I?")
  quota   Display disk usage and limits.
  rm   Remove files.
  rmdir   Remove folder(s).
  rsync   Remote file copy. (Synchronize directory trees).
  scp   Secure copy (remote file copy).
  source   Run commands from a file (see also `.').
  spect   Invoke the TRIUMF µSR spectrum-plotting program.
  ssh   Secure Shell client (remote login program).
  tail   Output the last part of files.
  tar   Tape ARchiver, used for backups (usually without tape).
  touch   Change file timestamps.
  top   List processes running on the system.
  umount   Unmount a device.
  unalias   Remove an alias.
  units   Convert units from one scale to another.
  unzip   List, test and extract compressed files in a ZIP archive.
  which   Search the user's $PATH for a program file.
  wget   Retrieve web pages or files via HTTP, HTTPS or FTP.
  zip   Package and compress (archive) files.
.   Run a command script in the current shell.
#   Comment / Remark
^C (Ctrl-C)   Abort current application.

Note: a description of the syntax of most commands can be obtained with the bash command

man <cmd>

where <cmd> is the command in question.


Jess H. Brewer
Last modified: Mon Aug 1 09:31:56 PDT 2011