This page contains quick references for basic shell commands and links to more detailed resources. You should learn basic shell commands to navigate directories and modify files on CHTC systems. Reference this page to learn or refresh your knowledge of shell commands.
Learn about the command line
Why should you learn about the command line?
If you haven't used the command line before, it may be challenging to get started. However, we strongly recommend learning more about the command line for multiple reasons:
You only need to know a few basic commands to submit jobs.
With practice, using the command line is significantly faster and much more powerful than using a point-and-click graphic interface.
Command line skills are useful for more than just large-scale computing!
Quick reference: Basic shell commands
Note: Bracketed items (<>) denote where to place your input. Do not include the brackets in your command.
Navigate directories
Command
Use
Notes
cd <path/to/directory>
changes current directory to path/to/directory
. - the current directory
.. - one level above the current directory
~ - your home directory (/home/username/)
pwd
prints path of the working (current) directory
ls <directory>
lists files in directory
-lh prints human-readable information
ls
list files in current directory
-a prints hidden files
mkdir <directory>
creates a directory
rmdir <directory>
removes a directory (must be empty)
Inspect files
Command
Use
cat <file>
prints contents of file
less <file>
views contents of file (similar to vim, but without edit capabilities)