# Basic commands

The following table lists the most common CLI command you'll use as a beginner 

::: {.rmdcaution}

If you execute a command that runs for a long time, cancel by typing `CTRL` + `C`

:::


| Command | Description | Notes |
|:--|:---|:---|
| `cat`                                    | Print a file to the screen. | Look at a file's contents without actually opening it.
| `cp [filename] [new_filename]`           | Copy a file. | Copy (`ctrl + c`) & paste (`ctrl + v`) in the GUI.
| `mv [filename_path] [filename_new_path]` |  Move or rename a file. | Renaming a file is just moving it to a new filename.
| `rm [filename_path]`                     |  Remove a file | Permanently delete a file
| `mkdir [directory_name]`                 |  Make a directory    | A directory is just a kind of a file, which contains other files in it.
| `rm -rf [directory_path]`                |  Remove a directory         | `-r` for recursive, `-f` for force 
|   `touch [filename]`                             |     create empty file           |
| `sudo [command]`  |  Execute as a super user  | Run a command using admin privilages.
| `alias name=command`                                  |   Make an alias for a command | Allows you to execute a complex `command` using a simple `name`.   |
| `clear` | Clear screen | Erase all the old text clutteting up your screen. |
| `exit` | Close the session | Exit the terminal |


The concept of a "super-user" is a very important one in *nix like systems. You will be mostly using this to authenticate yourself, especially when installing new tools, uninstalling or attempting to do something that can be dangerous, so proceed with caution. This will ask you for the root password.

::: {.rmdwarning}

Never execute commands that you don't understand. This goes for commands you've composed yourself or found online. This is especially true if they have dubious origins. And if contains `sudo` it's best to consider what the command does and where it comes from!

:::


Let's see these in action:



## Aliasing

Some of the commands that you want to type can be very long. As any developer can attest - the more keystrokes you spend on the computer, the larger the chance for errors and bugs in your software. In those cases it makes sense to create "aliases", or in other words - shortcuts for the commands you use.
