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

王林
Release: 2019-12-03 13:51:03
Original
38690 people have browsed it

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 ~
Copy after login

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 ./文件夹   切换到当前目录的某个文件夹
Copy after login

.. indicates the superior directory

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template