Home >Operation and Maintenance >Linux Operation and Maintenance >What do '~', '/' and './' in Linux represent?

What do '~', '/' and './' in Linux represent?

王林
王林Original
2019-12-03 13:51:0338701browse

What do '~', '/' and './' in Linux represent?

~ represents the home directory, which is the user directory of the currently logged in user.

For example: My logged-in user is chen

cd ~

Video tutorial recommendation: linux video tutorial

~ represents /home/chen /. Of course, the premise is that there is a user directory. If there is no /home/chen directory, the situation will be more complicated.

What do ~, / and ./ in Linux represent?

/ refers to the root directory: the top-level directory of all directories.

./ represents the current directory. ./ generally needs to be used in conjunction with other folders or files to refer to things in the current directory.

cd . 没有太多意义
cd ./文件夹   切换到当前目录的某个文件夹

.. indicates the superior directory

cd ..         切换到上级目录   
cd ../文件夹    切换到上级目录中的某个文件夹

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of What do '~', '/' and './' in Linux represent?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn