top of page

Basic Linux Commands I Actually Use (and What They Mean)

A woman looking confidently at her computer because she knows how to use Linux commands.

If you’ve ever watched someone work in a Linux terminal and thought, “I have no idea what’s happening, but I feel like I should,” you’re in very good company. We have all been there.


Linux commands don’t have to feel intimidating or exclusive. Most of us aren’t memorizing manuals. We’re learning a small set of essential Linux commands, using them regularly, and building confidence over time. This post covers the basic Linux commands I actually use (quite often) in real projects, explained in plain language with practical examples.


Environment variables (the ones you’ll see everywhere)

Before jumping into commands, it helps to understand environment variables, because you’ll see them constantly in Linux. Environment variables are bits of information your shell keeps about you and your system. You reference them with a '$' in front of the name.


$PATH is the most important one to understand early. It’s a list of directories your system checks, in order, when you type a command. When you run something like ls or python, Linux searches each directory in $PATH until it finds an executable. When you see “command not found,” it usually means the command isn’t in your $PATH.


Other environment variables you’ll see often include $HOME (your home directory), $USER (your username), $SHELL (the shell you’re using), and $PWD (your current directory). You can print any of these using echo, which is why we start there.


echo

'echo' prints text to the terminal. I use it constantly to sanity-check things, like printing messages, testing scripts, or inspecting environment variables.


Syntax

echo [text]

Examples

echo "Hello, Linux"
echo $PATH

clear

'clear' wipes the terminal screen so you’re not staring at old output. It doesn’t delete anything, but it just gives you a visual reset.


Syntax

clear

pwd

'pwd' stands for “print working directory.” When you’re not sure where you are in the file system (which happens more than people admit), this tells you.


Syntax

pwd

Example Output

/home/username/projects

ls

'ls' means “list,” and it shows files and folders in your current directory.


Syntax

ls [options]

Examples

ls

Add these options to show a long description of each file and all hidden files in the current directory

ls -la

cd

'cd' stands for “change directory.” It lets you move around the file system without changing anything.


Syntax

cd [directory]

Examples

cd projects

This command takes you up a folder. More about this next.

cd ..

~ , . , and ..

These show up everywhere once you start paying attention. '~' is your home directory, '.' is the current directory, and '..' is the parent directory.


Examples

cd ~
ls .
cd ..

mkdir

'mkdir' means “make directory.” This is how you create folders, and it’s usually where new projects start.


Syntax

mkdir [directory_name]

Example

mkdir projects

touch

'touch' creates an empty file or updates a file’s timestamp. It’s perfect for scaffolding files quickly.


Syntax

touch [filename]

Example

touch app.py

cp

'cp' copies files or directories. I use it constantly for backups or safe experimentation.


Syntax

cp [source] [destination]

Examples

cp file.txt backup.txt

mv

'mv' moves or renames files. This command works fast, so it’s worth slowing down and double-checking paths.


Syntax

mv [source] [destination]

Examples

mv old.txt new.txt
mv app.py src/app.py

rm ⚠️

'rm' permanently deletes files. There is no recycle bin. With that being said, be careful. This is one of the commands to treat with real respect.


Syntax

rm [file]

Examples

rm file.txt

Add the -r option to recursively remove all subdirectories and files in a folder.

rm -r old_folder

cat

'cat' displays the contents of a file. It’s read-only and safe, but large files can flood your terminal.


Syntax

cat [file]

Example


head

'head' shows the beginning of a file. Great for previews and quick checks.


Syntax

head -n 10 [file]

Example

head -n 10 app.log

tail

'tail' shows the end of a file. Especially useful for logs.


Syntax

tail [file]

Examples

tail app.log

nano

'nano' is a beginner-friendly terminal text editor with visible shortcuts at the bottom. This is my preferred editor.


Syntax

nano [file]

Example

nano config.yaml

vi / vim

'vi' (or 'vim') is a powerful editor that exists on almost every server. Not dangerous — just confusing until you learn how to exit.


Syntax

vi [file]

Example

vi app.py

grep

'grep' searches for text inside files and logs. It’s powerful and read-only.


Syntax

grep [pattern] [file]

Examples

grep "ERROR" app.log

Use -i to find any case of the pattern and -n to show line numbers where the pattern was found.

grep -i -n todo .

find

'find' helps you locate files when you know they exist but not where they live.


Syntax

find [path] [conditions]

Example

find . -name "*.py"

which

'which' shows the full path of the command your system is actually using.


Syntax

which [command]

Example

which python

curl ⚠️

'curl' transfers data from a URL and is commonly used for API testing. Be cautious when piping its output into other commands.


Syntax

curl [url]

Example


ps

'ps' shows running processes.


Syntax

ps

jobs

'jobs' lists background processes started in the current terminal session.


Syntax

jobs

kill ⚠️

'kill' stops a running process. Stopping the wrong one can crash applications. Normally you would run the 'ps' command to get the pid of a particular process that you want to 'kill'.


Syntax

kill [pid]

Example

kill 12345

sudo ⚠️

'sudo' runs commands with elevated permissions. Powerful, necessary — and dangerous if misused.


Syntax

sudo [command]

Example

sudo apt update

q

'q' exits paged views like less or man. If you ever feel stuck, try pressing it.


Example

q

Final thoughts

You don’t need to memorize this list. Familiarity comes from use, not perfection. Linux rewards curiosity and caution, especially with powerful commands. Also, remember that Google is still your friend until you get the hang of these. You may want to bookmark this blog, but know that there are way more options than I have listed here for these commands that you can normally see by using the option '--help' with any of these commands.


Once these start to feel natural, the terminal stops being intimidating and starts feeling like a workspace that you navigate naturally. You will probably even prefer to use the terminal when you get the hang of things. If there are any terminal commands that you find useful, then please comment them below and add to this list.

 
 
 

Comments


The Southern Tech Lady

  • Dribbble
  • Behance
  • Instagram
  • Facebook
  • Twitter
  • LinkedIn

©2025 by The Southern Tech Lady

bottom of page