Ubuntu Linux Shell Commands quick reference

The following is a quick reference list of some useful Linux shell commands along with a short description of common usage. There are several more, but this basic list was created to help familiarize the newly introduced Ubuntu users. Those who might be migrating from a Windows operating environment.

Linux Shell Commands - Quick Reference Guide

Linux Shell Commands Reference

Linux Shell Commands Quick Reference Guide

Example Linux Shell Commands

cd - change to a new directory.

cd <directory name>

clear - clear the screen.

clear

cp - copy files or directories.

cp file1 file2 cp -r source_directory/ target_directory/

diff - compare files for differences.

diff file1 file2

exit - exit or quit the terminal.

exit

find - find files by name.

find -name <filename>

fsck - check disk integrity.

fsck

ifconfig - view network settings (replaced by ip on newer distros).

ifconfig

less - view text files.

less <filename>

lpr - print text files.

lpr <filename>

man - get help for a provided command.

man <command>

mkdir - create a directory.

mkdir <directory name>

mv - move or rename files.

mv file1 file2

ping - check a network connection.

ping example.com

rm - remove files or directories.

rm file rm -r directory

tracepath - trace the path to a network host.

tracepath example.com

vi - edit files using the vi editor.

vi <filename>

Additional Linux Commands

Process Management

ps - list current processes.

ps

top - view real-time process activity.

top

kill - terminate a process by PID.

kill <pid>

bg - resume a job in the background.

bg

fg - bring a job to the foreground.

fg

File Permissions

chmod - change file permissions.

chmod 755 file

chown - change file owner.

chown user file

chgrp - change group ownership.

chgrp group file

grep - search for a pattern within a file.

grep "pattern" filename

locate - quickly find file paths (requires updatedb to be run).

locate filename

System Information

uname -a - display system and kernel info.

uname -a

lsb_release -a - show Linux distribution details.

lsb_release -a

df -h - show disk usage in human-readable format.

df -h

free -m - display memory usage in MB.

free -m

Final Thoughts on Linux Shell Commands

Learning to navigate the Linux shell can feel intimidating at first, especially if you're coming from a graphical Windows environment. But with just a handful of essential commands, you can begin to unlock the real power of the Linux operating system.

This guide covers only the basics, but it’s enough to get you started managing files, checking system resources, monitoring processes, and more,all from the command line. As you grow more comfortable, consider exploring tools like cron (for scheduling tasks), rsync (for syncing files), and advanced scripting with bash.

Don’t be afraid to use the man command whenever you're unsure how something works. The manual is built into nearly every Linux system and is one of the best resources available.

Pro tip: Practice makes permanent. The more often you use these commands, the more second-nature they’ll become.

Happy terminal-ing! 🐧