What even is a terminal?
A terminal is a way to talk to your operating system by typing commands instead of using your mouse (Which is slower!)
Terminal, shell and prompt
Section titled “Terminal, shell and prompt”- The terminal is the window. It shows text and passes what you type to the shell. Kitty, GNOME Terminal, Konsole and Alacritty are all terminals.
- The shell is the program running inside that window. It reads what you type and runs it. Fish and bash are shells.
- The prompt is the text the shell shows when it’s ready for a command, like
obay@laptop:~$.
How to open the terminal
Section titled “How to open the terminal”On most Linux desktops, you can press Ctrl + Alt + T and the terminal should open. If it didn’t open then, search for “terminal” in your app menu.
You’ll see something like this:
obay@laptop:~$This is the prompt. Type echo hello and press Enter:
echo hello# helloecho prints anything you give it.
How to install fish
Section titled “How to install fish”Your system already has bash, but you need to install fish:
# Ubuntu, Debian, Mintsudo apt install fish
# Arch, Manjarosudo pacman -S fish
# Fedorasudo dnf install fishsudo means “run this as the admin”, so it’ll ask for your password. On many systems nothing shows up on screen while you type the password. That’s normal, just type it and press Enter.
Then type fish to start it. The prompt changes to something like obay@laptop ~>, and now you’re in fish. Type exit whenever you want to go back to bash. You don’t have to make fish your default shell to follow along.
Run echo hello once more in fish. Now type ec. Fish shows the rest of the command in grey, and you can press to accept it. Fish suggests commands from your history, and this will save you so much time.
Bash doesn’t suggest things as you type, but press Tab and it’ll finish a command or file name for you when there’s only one match. Press it twice to see all the options.
Useful keys
Section titled “Useful keys”- and go through the commands you ran before.
- Tab completes command and file names.
- Ctrl + C stops the command that’s running.
- Ctrl + L clears the screen. that’s the same as typing
clear.