Have a Question?
Linux Commands Cheat Sheet
Linux Commands Cheat Sheet
Linux is one of the most prominent examples of free and open-source software collaboration. ARC clusters have Linux operating system and therefore users need to have a basic knowledge of commands used in the Linux user interface.
For more in-depth information about Linux usage on the cluster visit our knowledge base article on the subject.
Basic Linux commands
pwd: present working directory; what directory am I sitting in.
ls: contents present in the current directory
cd: Use this command to go to a directory. For example, if you are in the home folder, and you want to go to the downloads folder, then you can type in “cd Downloads”. To go back from a folder to the folder before that, you can type “cd ..” .
mkdir: Use this command when you need to create a folder or a directory.
rmdir: this command removes an empty directory.
rm: rm is used to remove a specific file.
touch: this is used to create a new file.
cp: cp is used to copy a file from one folder to another through command line.
cp Alpha /opt/ohpc/dd2020-hpc (copy the file Alpha to the directory /opt/ohpc/dd2020-hpc)
mv: move a file from one directory to another. Can be used similar to the syntax for cp.
Text Editors
- VI
- always available on a Linux system.
- enter insert mode with i.
- Exit insert mode with Esc key.
- Exit editor with Esc-wq to save work.
- Exit editor with Esc-q! to not save work.
- nano
- Easiest to use but not always available.
- Menu at the bottom of the screen.
- Use control-x (^x) to exit.
The users may also refer to the following resources which are the recordings and presentation of the linux workshop hosted by ARC.