Mastering Ubuntu: The Essential Commands You Need to Know

*Introduction *

Whether you’re just dipping your toes into Linux or managing a full-blown Ubuntu server, knowing your way around the terminal is non-negotiable. In this guide, we’ll walk through the most essential Ubuntu commands—step by step—explaini…


This content originally appeared on DEV Community and was authored by Isaiah Izibili

*Introduction *

Whether you're just dipping your toes into Linux or managing a full-blown Ubuntu server, knowing your way around the terminal is non-negotiable. In this guide, we’ll walk through the most essential Ubuntu commands—step by step—explaining not just how to use them, but why they matter. From installing packages to navigating directories and monitoring system health, this article is your launchpad into the world of Linux command-line mastery.

🐧 Essential Ubuntu Commands Explained Step-by-Step

Ubuntu is one of the most popular Linux distributions, widely used for development, server management, and learning Linux fundamentals. Below is a breakdown of key commands every Ubuntu user should know, what they do, and why they’re important.

🔐 sudo su

  • What it does: Switches to the superuser (root) account.
  • Why it matters: Some tasks require elevated privileges. sudo su gives you full access to the system.
  • How to use:
sudo su

You'll be prompted for your password. Once entered, your shell changes to root (# prompt).

Sudocommand

📦 Package Management
apt update

  • What it does: Refreshes the list of available packages and versions.
  • Why it matters: Ensures you're installing the latest versions.
  • How to use:
sudo apt update

apt update

apt install vim

  • What it does: Installs the Vim text editor.
  • Why it matters: Vim is a powerful tool for editing configuration files and code.
  • How to use:
sudo apt install vim

vim

apt install nginx

  • What it does: Installs the Nginx web server.
  • Why it matters: Nginx is widely used for hosting websites and reverse proxying.
  • How to use:
sudo apt install nginx

nginx

📁 File & Directory Management

mkdir

  • What it does: Creates a new directory.
  • Why it matters: Organize files into folders.
  • How to use:
mkdir my_folder

ls

  • What it does: Lists files and directories.
  • Why it matters: Helps you see what’s in your current directory.
  • How to use:
ls

Iist

cd

  • What it does: Changes the current directory.
  • Why it matters: Navigate your file system.
  • How to use:
cd my_folder

Cd folder

ls -l

  • What it does: Lists files with detailed info (permissions, size, date).
  • Why it matters: Useful for checking file attributes.
  • How to use:
ls -l

hinding list

pwd

  • What it does: Prints the current working directory.
  • Why it matters: Know where you are in the file system.
  • How to use:
pwd

pwd

touch

  • What it does: Creates an empty file.
  • Why it matters: Useful for quickly generating files.
  • How to use:
touch myfile.txt

touch

rm

  • What it does: Deletes files.
  • Why it matters: Clean up unnecessary files.
  • How to use:
rm myfile.txt

rmdir

  • What it does: Removes empty directories.
  • Why it matters: Helps maintain a tidy file structure.
  • How to use:
rmdir my_folder

rmdelete

cp

  • What it does: Copies files or directories.
  • Why it matters: Duplicate files or back them up.
  • How to use:
cp file1.txt file2.txt

coping

mv

  • What it does: Moves or renames files.
  • Why it matters: Organize or rename files.
  • How to use:
mv oldname.txt newname.txt

move

📊 System Monitoring
df -h

  • What it does: Shows disk space usage in human-readable format.
  • Why it matters: Monitor storage capacity.
  • How to use:
df -h

free -h

  • What it does: Displays memory usage.
  • Why it matters: Check RAM availability.
  • How to use:
free -h

memory usage

uptime

  • What it does: Shows how long the system has been running.
  • Why it matters: Useful for server health checks.
  • How to use:
uptime

monitor

🔍 Searching & Environment

grep

  • What it does: Searches for patterns in text.
  • Why it matters: Find specific data in files or output.
  • How to use:
grep "search_term" filename.txt

env

  • What it does: Displays environment variables.
  • Why it matters: Useful for debugging and configuration.
  • How to use:
env

environment variables

whoami

  • What it does: Shows the current user.
  • Why it matters: Confirm your identity, especially after switching users.
  • How to use:
whoami

who ami

🌐 Networking
nslookup

  • What it does: Queries DNS to resolve domain names.
  • Why it matters: Diagnose network issues.
  • How to use:
nslookup example.com

nslookup

ping

  • What it does: Sends packets to a host to test connectivity.
  • Why it matters: Check if a server or website is reachable.
  • How to use:
ping google.com

System Info & File Viewing

uname

  • What it does: Displays system information.
  • Why it matters: Know your OS and kernel version.
  • How to use:
uname -a

Iinux

cat

  • What it does: Displays file content.
  • Why it matters: Quickly read files.
  • How to use:
cat myfile.txt

cat file

df

  • What it does: Shows disk usage (not human-readable by default).
  • Why it matters: Monitor storage.
  • How to use:
df

show disk usage

Final Thoughts

Mastering these commands will give you a solid foundation in Ubuntu and Linux in general. Whether you're managing servers, writing scripts, or just exploring, these tools are your gateway to understanding and controlling your system.


This content originally appeared on DEV Community and was authored by Isaiah Izibili


Print Share Comment Cite Upload Translate Updates
APA

Isaiah Izibili | Sciencx (2025-09-28T02:25:46+00:00) Mastering Ubuntu: The Essential Commands You Need to Know. Retrieved from https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/

MLA
" » Mastering Ubuntu: The Essential Commands You Need to Know." Isaiah Izibili | Sciencx - Sunday September 28, 2025, https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/
HARVARD
Isaiah Izibili | Sciencx Sunday September 28, 2025 » Mastering Ubuntu: The Essential Commands You Need to Know., viewed ,<https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/>
VANCOUVER
Isaiah Izibili | Sciencx - » Mastering Ubuntu: The Essential Commands You Need to Know. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/
CHICAGO
" » Mastering Ubuntu: The Essential Commands You Need to Know." Isaiah Izibili | Sciencx - Accessed . https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/
IEEE
" » Mastering Ubuntu: The Essential Commands You Need to Know." Isaiah Izibili | Sciencx [Online]. Available: https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/. [Accessed: ]
rf:citation
» Mastering Ubuntu: The Essential Commands You Need to Know | Isaiah Izibili | Sciencx | https://www.scien.cx/2025/09/28/mastering-ubuntu-the-essential-commands-you-need-to-know/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.