Summary
Logging in and logging out
- There are two methods used for booting on the x86 architecture.
- MBR is the oldest method and it involves less steps but it has limitations such as limited partition count.
- UEFI is the newest method and it has less limitations.
Bootstrapping
- You can log in as any user as long as you have their username and password.
- The root user is the most privileged user.
- Although some tasks might require root access, it's not a good idea to do daily tasks on the root user.
- You can shutdown by writing systemctl shutdown on the terminal.
Logging in
- Terminal is the place where the console input and output is shown.
- Every program that user interacts technically runs on a terminal, including the graphical interface.
Introduction to the terminal
- Paths are divided by /, instead of \.
- . is an alias for the current directory.
- .. in an alias for the previous directory.
Path structure
File navigation commands
| Command | Meaning |
|---|---|
| ls (directory) | Show the contents of the directory mentioned. If no argument is provided, it will show the contents of the current directory. (list) |
| pwd | Show the current directory. (present working directory) |
| cd (directory) | Change directory to the mentioned directory. If no argument is provided, it will change the current directory into the home directory. (change directory) |
Other commands
| Command | Meaning |
|---|---|
| file (file) | Show the type of the file. (file) |
| echo (message) | Print the written message back. (echo) |
| whoami | Check which user you are running as. |
| apropos | Search the manual database for the keyword. |
| man | See the manual page for an entry. |
Terminal shortcuts
| Command | Meaning |
|---|---|
| Ctrl+A | Go to the first character in the prompt. |
| Ctrl+E | Go to the last character in the prompt. |
| Ctrl+L | Clean the terminal screen. |
| Ctrl+H | An alternative to the backspace key. |
| Ctrl+O | Execute the command. |
| Ctrl+C | Terminate the program running. |
| Ctrl+P or the up arrow key | Show the previous command. |
| Ctrl+N or the down arrow key | Show the next command if there is. |
| Tab | Autocomplete. When there are multiple choices it will print them. |