Essential Ubuntu Terminal Commands: A Complete Guide for Beginners

Table of Contents

If you’re new to Ubuntu or just starting to explore the terminal, you’re in the right place. The Linux command line is a powerful tool that lets you control your system efficiently. In this guide, we’ll walk you through the most important Ubuntu terminal commands—organized by category—for beginners and intermediate users.

Whether you want to manage files, install software, or monitor system performance, this article has you covered.

Why Use Terminal in Ubuntu?

  • More control over the system
  • Faster operations for repetitive tasks
  • Access to advanced features
  • Remote server management

1. Basic File and Directory Commands

CommandDescription
lsList files and directories
cd [directory]Change directory
pwdShow current directory
mkdir [name]Create a new directory
rm [file]Delete a file
rm -r [folder]Delete a folder recursively
cp [src] [dest]Copy file or folder
mv [src] [dest]Move or rename file/folder
touch [file]Create an empty file
nano [file]Edit file using Nano editor
clearClear the terminal

2. System Information Commands

CommandDescription
uname -aDisplay system info
topLive view of processes
htopInteractive process viewer
df -hDisk usage
free -hMemory usage
uptimeSystem uptime
whoamiCurrent user
hostnameHostname of the system

3. APT Package Management

CommandDescription
sudo apt updateUpdate package index
sudo apt upgradeUpgrade all packages
sudo apt install [package]Install a package
sudo apt remove [package]Remove a package
sudo apt autoremoveRemove unused dependencies
apt list --installedList installed packages

4. User Management

CommandDescription
adduser [username]Add new user
passwd [username]Change user password
deluser [username]Delete a user
groups [username]List user groups
sudo suSwitch to root

5. Networking Commands

CommandDescription
ip aList network interfaces
ping [host]Ping a server
traceroute [host]Trace packet path
netstat -tulnShow ports and services
curl [url]Make web request
wget [url]Download file from URL

6. Archive and Compression

CommandDescription
tar -czvf file.tar.gz folderCreate tar.gz archive
tar -xzvf file.tar.gzExtract tar.gz archive
zip -r file.zip folderCreate zip archive
unzip file.zipExtract zip archive

7. Disk and Partition Management

CommandDescription
lsblkList all drives
sudo fdisk -lView partition table
df -ThDisk usage with types
mount /dev/sdX /mntMount a drive
umount /mntUnmount a drive

Bonus: Create Aliases

Speed up your workflow with aliases:

alias update='sudo apt update && sudo apt upgrade'

Add this to ~/.bashrc or ~/.zshrc to make it permanent.

Conclusion

These commands form the foundation of your Linux terminal journey. Whether you’re managing files, installing software, or configuring a network, knowing these commands will make you more confident in using Ubuntu.

Share this post with friends or save it as your personal cheat sheet.