I’ve noticed that many friends who are starting to use Linux (particularly Ubuntu) struggle with terminal usage. This guide covers the basics you can set up on day one, in about 10 minutes. Once you are comfortable, continue with Terminal Setup: Advanced.

This guide uses Bash, the default shell on Ubuntu. If you prefer Zsh, see ZSH Setup. You can also find this setup on my GitHub: Ubuntu Basic Setup

1. Essential Commands

Open a terminal with Ctrl + Alt + T. These are the commands you will use every day:

CommandWhat it doesExample
pwdShow the current directorypwd
lsList files (-a hidden files, -l details)ls -al
cdChange directory (.. up, ~ home)cd ~/Downloads
mkdirCreate a directory (-p for nested paths)mkdir -p ros2_ws/src
cpCopy files (-r for directories)cp -r src backup
mvMove or renamemv old.txt new.txt
rmDelete (-r for directories)rm -r build
cat / lessPrint a file / scroll through itless log.txt
sudoRun a command as administratorsudo apt update
aptInstall and remove softwaresudo apt install git
man / --helpShow the manual for a commandman ls

Warning

rm does not move files to the trash. Deleted files are gone, so double-check the path, especially with rm -r.

Want to understand how it all works?

Linux Terminal 101 walks through the shell, the file system, permissions, pipes, and APT step by step.

2. Terminator

Terminator lets you split one window into several terminals, which is handy when you run multiple ROS 2 nodes at once.

sudo apt install terminator

To open Terminator with Ctrl + Alt + T, make it the default terminal and select terminator from the list:

sudo update-alternatives --config x-terminal-emulator
ActionShortcut
Split side by sideCtrl + Shift + E
Split top and bottomCtrl + Shift + O
Move between splitsAlt + Arrow keys
Maximize / restore a splitCtrl + Shift + X
New tabCtrl + Shift + T
Close the current splitCtrl + Shift + W

3. Case-Insensitive Tab Completion

Configure ~/.inputrc to make tab completion case-insensitive.

Option 1: Edit directly

vim ~/.inputrc

Add the following:

set completion-ignore-case on
set show-all-if-ambiguous on
set colored-stats on

Option 2: Generate via commands

echo 'set completion-ignore-case on' > ~/.inputrc
echo 'set show-all-if-ambiguous on' >> ~/.inputrc
echo 'set colored-stats on' >> ~/.inputrc

Apply settings

bind -f ~/.inputrc

4. fzf (Fuzzy Finder)

A fuzzy finder for your command history, files, and directories.

Installation

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

Usage

  • Ctrl + R → Fuzzy search through command history
  • Ctrl + T → Find a file and paste its path into the command line
  • Alt + C → Find a directory and cd into it

5. Keyboard Shortcuts

These work in any Bash terminal without extra setup:

ShortcutWhat it does
Tab / Tab TabComplete a command or path / show all options
↑ / ↓Previous / next command in history
Ctrl + A / Ctrl + EJump to the start / end of the line
Ctrl + U / Ctrl + KDelete to the start / end of the line
Ctrl + WDelete the previous word
Ctrl + LClear the screen
Ctrl + CStop the running command
!!Run the previous command again (e.g. sudo !!)

Apply the Settings

Reload your shell configuration, or simply open a new terminal:

source ~/.bashrc

See also