Home » Latest News » Basic Linux commands every beginner should know for everyday use

Basic Linux commands every beginner should know for everyday use

Linux terminal window
Linux terminal window. Photo by Diana ✨ on Pexels.

Trying a Linux desktop for the first time can feel a little intimidating, especially when people start talking about “the terminal”. The good news is that you only need a small set of commands to handle everyday tasks like finding files, checking disk space and installing software.

This guide walks through beginner friendly Linux commands, explains what they do and shows simple examples. You can follow along on almost any distribution that offers a terminal, such as Ubuntu, Fedora, Mint or Debian.

Opening the terminal and understanding the prompt

Most Linux desktops let you open a terminal from the app menu by searching for “Terminal”. You can also usually press a keyboard shortcut like Ctrl+Alt+T. A window with a text prompt appears, waiting for commands.

The prompt often shows your username, computer name and current folder, for example:user@pc:~$. The tilde (~) means your home folder. When you type a command and press Enter, the shell runs it and prints any output below.

Moving around folders with cd and ls

To work with files you need to move between folders. The commandlslists the contents of the current folder. Trylsto see files, andls -lfor a detailed list that includes sizes and dates.

Usecdto change directories:cd Documentsmoves into the Documents folder if it exists.cd ..goes up one level, andcd ~or justcdreturns to your home folder.

Viewing files with cat, less and nano

For text files, three commands are especially useful.cat filename.txtprints the entire file to the screen. This works well for short files but can scroll quickly for long ones.

less filename.txtlets you scroll with the arrow keys, Page Up and Page Down. Pressqto quit. To make quick edits, use a simple text editor likenano filename.txt, follow the on screen help, then press Ctrl+O to save and Ctrl+X to exit.

Copying, moving and deleting files safely

Three basic commands handle file management:cpfor copy,mvfor move or rename, andrmfor remove. For example,cp notes.txt notes-backup.txtcreates a copy, andmv oldname.txt newname.txtrenames a file.

Be careful withrm, since it deletes files without using a recycle bin. Start with simple uses likerm file.txt. Avoid powerful options likerm -rfuntil you are more experienced, because a typo can remove important data.

Finding files and searching inside them

Linux command line
Linux command line. Photo by Bernd 📷 Dittrich on Unsplash.

When you forget where something is,findcan help. A common pattern isfind . -name “report*.pdf”which searches the current folder and subfolders for PDF files starting with “report”. The dot (.) means “start here”.

To search inside text files,grepis very useful. For example,grep “error” logfile.txtshows lines that contain the word “error”. Add-ifor case insensitive search or-rto search through folders recursively.

Checking disk space, memory and running processes

Basic system health checks are easy from the terminal. To see how much disk space is left, rundf -h. The-hoption shows human friendly units like GB and MB. To check memory usage, usefree -h.

To see running programs,topgives a live view of processes and their CPU and memory usage. Pressqto exit. Many users also installhtopfor a more colourful and easier to read process list.

Installing and updating software from the terminal

Different Linux distributions use different package managers, but the idea is similar: one tool handles installing and updating software safely. On Debian based systems, including many popular desktops, the command is oftenapt.

Typical actions look like this:sudo apt updaterefreshes the package list, andsudo apt install vlcinstalls the VLC media player. Thesudoprefix runs a command with administrator rights, which is needed for system wide changes. Type your password when asked.

Getting help with man pages and built in options

You do not need to memorise every option of every command. Most tools offer quick help withcommand -horcommand –help. This usually shows the most common flags and a short description.

For more detail, Linux provides manual pages. Runman lsorman grepto read in depth help, then scroll with the arrow keys and pressqto exit. Spending a few minutes with man pages is one of the quickest ways to grow more confident with the terminal.

Building confidence step by step

The terminal can seem strict at first, but it rewards careful, patient use. Start with harmless commands that only read information, such asls,pwd,df -handfree -h. Then move on to basic file management and package installation.

Over time, these simple commands become muscle memory. Even if you mainly use graphical tools, knowing how to run a handful of Linux commands makes troubleshooting easier and gives you more control over your system.

0 comments