SVS Solutions
← All guides
Terminal · 9 min read

Essential Linux commands for a solid start.

A direct reference for finding your way around, working with files, and searching for information in a terminal.

The terminal is a way to talk to your system through text. Each command does a small task. You do not need to memorize everything: start with a few commands, read their output, and use help when needed.

Know where you are

CommandExampleWhat it does
pwdpwdShows the current folder.
lsls -laLists files; -la adds details and hidden items.
cdcd Projects/siteEnters a folder.
cd ..cd ..Goes up one folder.
cd ~cd ~Goes to your home folder.

Create and organize files

mkdir materials             # creates a folder
mkdir -p notes/2026/october # creates a series of folders
touch reminder.txt          # creates an empty file
cp source.txt copy.txt      # copies a file
mv old.txt new.txt          # moves or renames a file

Use cp -r source-folder copied-folder to copy an entire folder. Before moving or replacing files, run ls to check names and destination.

Read without editing

cat reminder.txt       # shows a short file
less large-file.log    # paged reading; press q to exit
head -n 20 file.txt    # shows the first 20 lines
tail -n 20 file.log    # shows the last 20 lines
tail -f app.log        # follows new lines in real time

Find files and text

find . -name "*.html"    # finds HTML files below the current folder
rg "search phrase"       # searches for text in project files
rg --files | rg "config" # lists files with config in their name

rg, also called ripgrep, is fast for searching projects. If it is not installed, grep is a common alternative: grep -R "phrase" ..

Permissions and processes

chmod +x script.sh  # lets a script run
ps aux             # lists running processes
man ls             # opens the ls manual

Avoid using sudo by habit. It runs a command with administrative powers and can modify important parts of the system. Read the command and understand why it is needed before confirming it.

The command that deserves extra care

rm deletes files. Start with rm -i file.txt, which asks for confirmation. Do not copy cleanup commands without understanding the path they use. After deletion, there may be no trash or simple recovery.

A routine for building confidence

  1. Use pwd and ls before creating, moving, or deleting.
  2. Prefer testing in an example folder first.
  3. Use Tab to complete paths and reduce typing errors.
  4. Read man command-name whenever an option is unclear.