The Linux command line is powerful, but it might take a bit getting used to. In this lesson we start with some navigation and we’ll play with some files. Fun fact, a lot of these commands also work on the Mac command line.
In general when you login into a machine through SSH you’ll end up in the home directory of a user. In this case /home/pi but than. Here is a list of commands and a short explanation of their use.
Now that you have access to the command line, you can give them a try. We’ll get back to them later on in more detail.
| Command | Explanation | 
|---|---|
| ls | list, show the content of the directory. Similar to dir in Windows | 
| cd | change directory | 
| clear | clear the output on the screen | 
| mkdir | make directory | 
| rmdir | remove empty directory | 
| touch | create file | 
| rm | remove file or not empty directory | 
| cp | copy | 
| mv | move | 
| man | manual, works on all commands | 
When you are familiar with these basic commands, you can check out the following.
| Command | Explanation | 
|---|---|
| cat | display content of a file | 
| echo | add text to a file – compare > and >> | 
| df | show available/used disk space | 
| du | disk usage, show how the directory is build up | 
| hostname | to find out the name of the machine | 
| uname | find information about system, like distro, kernel, processor | 
| sudo | super user do, in front of a command to have root privileges | 
| apt | debian family packate manager | 
| chmod | change access rights | 
| chown | change owner/group | 
| tar | (un)pack tarball archives | 
| unzip | unpack zip archives | 
You can use your arrow keys (up and down) to go to to previous typed command, which saves typing.
