The Complete Magazine on Open Source

8 Linux terminal commands you must know

, / 44744 8

Linux terminal commands

You need to know the basics of file management and navigation to use Linux like a pro. Each command in Linux terminal does just one thing but does it really well. Today, we have listed eight terminal commands that you need to know.

Is – List Files

You can list the files in a particular directory using Is command. This command lists all files in the current directory. You can list these files recursively by using Is -R. This will help you list all files in directories that are inside the current directory. If you wish to list files in some specific directory, you can specify the directory. For instance, Is /home will list all the files in home directory.

cd – Change Directory

You can change the current directory and navigate to another using cd command, such as cd documents will take you to Documents directory. You can even specify the full path to navigate to some specific folder. For instance, use cd/usr/downloads to navigate to downloads folder on the file system.

rm – Remove Files

This command is used to remove files. You have to be very careful while using rm. It doesn’t ask for the confirmation. Like all other commands, you can specify the full path to the file to delete the particular file on the system.

rmdir – Remove Directories

This command removes an empty directory. rmdir directory would delete the directory named “directory” from the file system. If the directory isn’t empty, you can use recursive rm command to remove it. This will also remove all the files in that specific directory.

mv – Move Files

This command can help you move a file to a new location. You can also rename the files while moving them. For instance, mv pic1 pictures would move the file named “pic1” from the current directory to the file called “pictures” in the current directory. You can use the full paths to move files to and from other directories.

cp – Copy Files

This command works like the mv command. However, it copies original files instead of moving them. You can use the recursive cp -r to copy directory and all files inside it to a new location. e.g., cp -r /home/user/Downloads /home/Desktop would copy files of /home/user/Downloads into /home/Desktop

mkdir – Make Directories

This command helps you create a new directory. You can use it like mkdir untitled to create a new directory named “untitled” in the current directory.

In – Create Links

This command is used to create new links. The most commonly used type of ln is a symbolic link. For instance, ln -s /home/user/Downloads /home/user/Desktop would create a link to Downloads folder on the desktop.

So these were some of the important commands for Linux terminal. We recommend you to use Midnight Commander to test any of the above commands. It works as a full-featured file manager for Linux terminal.

  • moldor

    Not to mention the ever-popular “sudo rm -rf /”

    • Jan Hansen

      Hoho ;-)

    • Sander Teunissen

      You, sir, are evil :)

  • Adam J

    well…. UI-free storage navigation maybe isnt “commanding” as much perhaps but, navigating is important. The best way to learn is to install ARCH linux on a virtual machine and, then you’re kind of stuck with these commands, lol.

    Maybe next we could see continued textbased computer use like how do you check your email in text only mode and maybe how to get and get running a small game from terminal?

  • blocus

    and what about chmod ?

  • Michael

    ….and sudo -i?

  • isotrex

    don’t forget… clear

  • Pingback: 8 Linux terminal commands you must know - Open Source For You - vd Velde IT Den Haag()