Top 5 Most Used Linux Commands

Recently I made the switch from Windows to Linux (Nobara). I chose Nobara because I game and wanted a distro that will give me the best setup out of the box, and boy does this distro rock. I’ll save the praise for later, I could type a book about how much I’m enjoying it – actually that would make a good post. Stay tuned.


The first command, is cd (change directory):

  1. cd will be your #1 used command. It allows you to move to directories through the terminal and even takes you back to your home folder!

cd ~ ( ~ is representing your home folder, and is a quick way to get back)


2. pwd (print working directory) – outputs where you’re currently at in the filesystem

3. mkdir (make directory) – makes a directory. E.G. mkdir <name of directory>

The next command I find myself using the most, ls (list). <ls> lists all, but hidden files in the current directory you’re in. With some switches you can also get it to list out details about the files/directories, lets see an example.

Entering the above command presents us with a long listing of the current file/directories in the /etc/cups directory. -l is to display a long listing, and -a is used to display hidden files.


4. cp (copy) is used to copy files and directories. Use ‘cp’ followed by the source file/directory and the destination. For example, cp file.txt ~/Documents


5. rm (remove) is used to delete files and directories. For files simply type: rm <name of file>.

Directories: rm <name of directory> -r The -r deletes recursively, removing the entire directory


These commands are what I’m using most of the time and knowing them can help you navigate the terminal with ease.

Tagged:

Related Posts