Linux Basics¶
Even if you’re new to being on a cluster or even new to Linux as a whole, we still have you covered. We can’t teach you every Linux command, as there are an infinite number of commands available, but we can show you the most common Linux commands and which ones you’ll use the most while on the cluster.
Common Commands¶
Handling Files (Copy, Move, Delete)¶
Command |
Description |
|---|---|
mkdir |
Makes a new directory |
cp |
Copies file with new name |
mv |
Rename or move files to a new directory |
rm |
Removes a file or a folder with |
Warning
Commands that write to a file will almost always overwrite an existing file without warning. Always be careful and deliberate with these commands, there is no undo button.
Reading and Writing to Files¶
Command |
Description |
|---|---|
cat |
Prints output of file in terminal |
head |
Shows only top 10 lines of a file |
tail |
Shows only the last 10 lines of a file |
nano |
Simple text editor |
vim |
Highly configurable text editor |
Tip
If you’ve never used vim before, use I to enter insert mode, Esc to leave it, :wq to save and quit, and :q! to quit without saving.
Helpful Keybinds¶
Tab: While typing a file or foldername, click tab and linux finish the name for you.
↑ / ↓ : Cycles through your previous commands with the up-and-down arrows.
Ctrl + R : Enters a reverse history search, helpful when a previous command would require pressing ↑ many times.
Ctrl + C : Will kill the current command (Useful if you have a frozen terminal).
More Information¶
We could have included many more commands on this page that you will eventually use, but what is the point of that? These commands are the foundation for system navigation and file management. Learn these commands first, then learn the more advanced commands when you actually need to use them.
If you do want to dive deeper into more advanced Linux commands, here is a massive and simplified Linux Command Browser: https://tldr.inbrowser.app/