In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of how to enter the directory under linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this linux article on how to enter the directory, let's take a look.
The command for linux to enter the directory is "cd". Cd command is used to switch the working directory, you can enter the specified directory, there are two syntax: 1, "cd [relative path or absolute path]"; 2, "cd [special characters]", followed by special characters to express a fixed meaning, such as "cd ~ user name" means to enter the specified user's home directory.
The operating environment of this tutorial: CentOS 6 system, Dell G3 computer.
The command for linux to enter the directory is "cd".
The cd command, which is an acronym for Change Directory, is used to switch between working directories and can be entered into a specified directory.
The basic format of the cd command is as follows:
Cd [relative or absolute path]
In addition, the cd command can be followed by some special symbols to express a fixed meaning, syntax:
Cd [Special character] Special symbol is used to represent the home directory of the currently logged in user ~ the user name indicates switching to the specified user's home directory-represents the last directory. Represents the current directory.. Represent the superior directory
Their uses are:
1. Enter the home directory of the currently logged in user
Cd ~ # means going back to your home directory. For root users, the home directory is / rootcd# without any path, and it also means going back to the home directory of the currently logged in user cd ~ vbird# represents switching to the home directory of the user vbird, that is, / home/vbird
2. Enter the current directory at a higher level
Cd.. # means to switch to the current one-level directory, that is, the one-level directory of / root
3. Go back to the directory you just had
Cd-
Learn the usage of cd -.
[root@localhost ~] # cd / usr/local/src# enter the / usr/local/src directory [root@localhost src] # cd-/ root [root@localhost ~] # # "cd -" command back to the home directory before entering the src directory [root@localhost ~] # cd-/ usr/local/src [root@localhost src] # # execute the "cd -" command again, and go back to the / usr/local/src directory
Example 2: learn cd. And cd.. The usage of.
[root@localhost ~] # cd / usr/local/src# enter the test directory [root@localhost src] # cd.. # enter the parent directory [root@localhost local] # pwd/usr/local#pwd is the command to view the current directory, you can see that we have entered the higher directory / usr/local [root@localhost local] # cd. # enter the current directory [root@localhost local] # pwd/usr/local# this command will not change the directory Just tell everyone "." Represents the current directory
Description: the pwd command is used to display the current directory
This is the end of the article on "how to enter the catalog under linux". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to enter the directory under linux". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.