Could we help you? Please click the banners. We are young and desperately need the money
When you first open the terminal in Linux Mint, it might feel intimidating. That black screen with blinking cursor looks nothing like the friendly GUI you're used to.
Good news: You don't need to memorize hundreds of commands. About 20 commands cover 80% of what you'll actually do day-to-day.
In this guide, I'll show you the essential Linux Mint command line basics that you'll genuinely use—no obscure commands that you'll forget tomorrow.
Learning basic terminal commands gives you:
Three ways to open the terminal in Linux Mint:
Ctrl + Alt + T (fastest way)These commands help you move around your file system.
Shows your current directory (Print Working Directory).
pwd
# Output: /home/yourusername
Lists files and folders in your current directory.
ls # Basic list
ls -l # Detailed list with permissions, size, date
ls -la # Show hidden files too
ls -lh # Human-readable file sizes (KB, MB, GB)
Move between folders.
cd Documents # Go to Documents folder
cd .. # Go up one level
cd ~ # Go to your home directory
cd - # Go back to previous directory
cd / # Go to root directory
Essential commands for working with files and folders.
mkdir projects # Create one folder
mkdir -p projects/web/css # Create nested folders
touch index.html # Create a single file
touch style.css script.js # Create multiple files
cp file.txt backup.txt # Copy file
cp -r folder new_folder # Copy folder and contents
cp *.txt Documents/ # Copy all .txt files to Documents
mv oldname.txt newname.txt # Rename file
mv file.txt Documents/ # Move file to Documents
mv *.jpg Pictures/ # Move all images
Warning: Deleted files don't go to Trash—they're gone permanently!
rm file.txt # Delete a file
rm *.tmp # Delete all .tmp files
rm -r folder # Delete folder and contents
rm -rf folder # Force delete (use with extreme caution!)
Read files without opening an editor.
cat file.txt # Show file contents
cat file1.txt file2.txt # Show multiple files
Opens files in a scrollable viewer. Press q to quit.
less long-file.txt
# Use arrow keys to scroll, q to quit
head file.txt # First 10 lines
head -n 20 file.txt # First 20 lines
tail file.txt # Last 10 lines
tail -f log.txt # Follow file (great for logs)
Find text within files.
grep "error" log.txt # Find "error" in file
grep -r "TODO" . # Search all files in current folder
grep -i "warning" log.txt # Case-insensitive search
For beginners, nano is the easiest terminal text editor.
nano file.txt
Basic nano shortcuts:
Ctrl + O - Save fileCtrl + X - ExitCtrl + K - Cut lineCtrl + U - PasteCtrl + W - SearchUnderstanding who can read, write, or execute files.
When you run ls -l, you'll see something like:
-rw-r--r-- 1 user group 1234 Dec 7 10:00 file.txt
This breaks down as:
rw- - Owner can read and writer-- - Group can only readr-- - Others can only readchmod +x script.sh # Make file executable
chmod 755 script.sh # rwx for owner, rx for others
chmod 644 file.txt # rw for owner, r for others
Common permission numbers:
755 - Executable files, scripts644 - Regular files777 - Full permissions (rarely needed, avoid)sudo chown user:group file.txt
sudo chown -R user:group folder/
Installing and managing software from the terminal.
sudo apt update
sudo apt upgrade # Upgrade all packages
sudo apt upgrade firefox # Upgrade specific package
sudo apt install gimp # Install single package
sudo apt install vlc htop curl # Install multiple packages
sudo apt remove package-name # Remove package
sudo apt purge package-name # Remove with config files
sudo apt autoremove # Remove unused dependencies
apt search photo editor
apt show gimp # Show package details
Check what's happening on your system.
Shows running processes and resource usage. Press q to quit.
top
# Or use htop for a better interface:
sudo apt install htop
htop
df -h # Show all disk usage
df -h /home # Show specific partition
du -sh folder/ # Size of specific folder
du -sh */ # Size of all folders in current directory
du -h --max-depth=1 # Size of subdirectories
free -h # Human-readable memory info
uname -a # All system info
uname -r # Kernel version
Control running programs.
ps aux # List all running processes
ps aux | grep firefox # Find specific process
kill 1234 # Kill process with ID 1234
killall firefox # Kill all Firefox processes
kill -9 1234 # Force kill (last resort)
Ctrl + C - Stop current commandCtrl + Z - Pause command (use fg to resume)Ctrl + D - Exit terminalBasic networking tools.
ping google.com # Test internet connection
ping -c 4 google.com # Ping 4 times then stop
curl https://example.com/file.zip -o file.zip
wget https://example.com/file.zip
ip addr # Show IP addresses
ip route # Show routing table
Make your terminal work faster.
Press Tab to auto-complete file and folder names:
cd Doc[Tab] # Completes to Documents/
↑ to scroll through previous commandsCtrl + R then type to search historyhistory to see all previous commandsclear # Clear terminal
# Or press Ctrl + L
!! # Run last command again
sudo !! # Run last command with sudo
cd projects && ls # Run both if first succeeds
mkdir test || echo "Failed" # Run second if first fails
command1; command2 # Run both regardless
ls > files.txt # Save output to file
ls >> files.txt # Append output to file
cat file1.txt file2.txt > combined.txt
ls -l | grep ".txt" # Pipe output to another command
Practical scenarios you'll actually encounter.
du -h ~ | sort -rh | head -20
# Shows 20 largest files/folders in home directory
find ~/logs -name "*.log" -mtime +30 -delete
# Deletes log files older than 30 days
sudo apt update
sudo apt install git curl build-essential
find . -name "*.php" # Find all PHP files
find . -name "config*" # Find files starting with "config"
locate filename # Fast search (needs updatedb first)
tar -czf backup.tar.gz ~/Documents
# Creates compressed backup of Documents folder
Navigation:
pwd - Show current directoryls -la - List files with detailscd folder - Change directoryFile Management:
mkdir folder - Create directorytouch file - Create filecp source dest - Copymv source dest - Move/renamerm file - DeleteViewing Files:
cat file - Display fileless file - Scroll through filehead/tail file - First/last linesgrep "text" file - Search in fileSystem:
top - Task managerdf -h - Disk spacefree -h - Memory usagesudo apt update - Update packagessudo apt install app - Install softwareStart small: Pick 5 commands and use them daily for a week. Once they feel natural, add 5 more.
Use man pages: Type man command to see the manual for any command.
man ls # Read full documentation for ls
Practice safely: Create a test folder to practice file operations:
mkdir ~/practice
cd ~/practice
# Now experiment without fear
Don't memorize flags: Remember the basic command, then use --help when you need options:
ls --help
The Linux Mint command line isn't as scary as it looks. With these 20 essential commands, you can:
Start with the basics—navigation and file management. Once those feel comfortable, add system commands and package management. Before you know it, you'll reach for the terminal first, not last.
The terminal becomes second nature with practice. Give it two weeks of daily use, and you'll wonder how you ever lived without it.