» » Navigation commands in the Linux terminal

Navigation commands in the Linux terminal

Section: Other | Actuality: Unspecified
Navigation commands in the Linux terminalIn this article we will talk about navigation commands in the terminal. 
Before proceeding to the navigation commands in the terminal, let's talk about directories in Linux. There is no C: drive, D: and others.
No matter how many partitions you break your disk, the system will:
"/" - root directory
Then there are all the other directories that are used for something.
The /home directory holds the user directories, in which, as a rule, to perform most actions without the administrator password. Your home directory is located at /home/your_username.
The /mnt and /media the directories are mounted in different physical disks, USB flash drives and other media.
In the /media directory mounted drives, flash memory drives, that is in this directory it can create folder with name of your electronic media.
For more details, see the What is the purpose of the folders in the directory structure of Linux Mint?
Navigation commands in the terminal.
When you open terminal from the menu, then you are in your home directory:
Navigation commands in the Linux terminalThe symbol ~ (tilde) means the home directory of the current user.
To find out the current directory (display the full path to the current directory) in the terminal just type the command:
To navigate in terminal use the command "cd" (eng. change directory).
Start by specifying the cd command, then the path where you need to go.
Here is the jump in the /home directory:
cd /home
But that's not all you can do with the command cd:
Navigation commands in the Linux terminalGo to the directory level above:
cd ..
Go to the directory two levels above:
cd ../..
Go to the home directory of your user:
Go to the home directory of user user_name:
cd ~user_name
Go to the directory where you were before switching to the current directory:
cd -
Displays the contents of the current directory:
Display the contents of the current directory with the symbol names that indicates their type:
ls -F
Show detailed view of files and directories in the current directory:
ls -l
Show hidden files and directories in the current directory:
ls -a
The keys can be combined together:
ls -la
In addition, the ls command has so many other keys that can be viewed by running the command:
ls --help
When you enter the cd command, you do not have to enter the full directory name, just press the TAB key, it will autocomplete the directory name. If the name is not filled, then there is another directory with the same name. Double-tapping the TAB key, you will see the list with the directories that have in their name the initial letters you typed. If the list is huge, then to cancel press N.
This applies not only to cd, but and other commands. For example, when You want to edit a file. You have performed an ls command, and saw that the file name consists of the 30 characters, it is enough to enter first letters of name and press TAB and it will autocomplete.
May the Force be with you,
Good Luck!!!

Print version

Add comments

  • Local comments
  • Facebook comments
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    Your working environment Other polls