Learning basic Linux commands will allow you to navigate directories, manage files, run programs and more in the Linux terminal. Below are some common and useful commands to get started with along with examples.

In this article, I’ll cover some of the most essential Linux commands grouped by common uses.

Navigation Commands

cd – Change directory. Navigate to another directory.

cd .. – Go back one directory up to the parent folder.

ls – List contents of current directory. View files/folders.

pwd – Print working directory. See your current path.

File Management Commands

mkdir – Make a new directory. Create a folder.

touch – Create a new blank file.

rm – Remove a file (use with caution!).

rm -r – Recursively remove a directory and its contents.

cp – Copy files from one location to another.

mv – Move or rename files and directories.

cat – Output file contents to the terminal.

less – View file contents interactively (paging, search, etc).

Permissions Commands

chmod – Change permissions of files/folders (read, write, execute).

chown – Change ownership of files and directories.

chgrp – Change group ownership of files and directories.

sudo – Execute a command with superuser (root) privileges.

su – Switch to another user account.

Additional Helper Commands

man – View the manual page of a command.

grep – Search for text patterns inside files.

find – Search for files matching criteria.

tar – Archive files into a .tar file or extract them.