What does linux server home do?

藏色散人
藏色散人Original
2023-03-24 09:58:173294browse

Linux server home refers to the home directory, which is the user's home directory or user list directory. It is usually used to save the user's files; when a user logs in to the system, the location is "/home" .

What does linux server home do?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What does the Linux server home do?

1. The home directory is the user's home directory. When a user logs in to the system, his or her location is /home.

2. Usually used to save user files.

3. The tilde "~" is usually used to represent the current user's home directory (home directory): For example, if the current user's home directory is /home/DUpala, then enter cd or cd ~ or cd /home/DUpala or cd $HOME are both equivalent. This habit originated from the Lear-Siegler ADM-3A terminal machine popular in the 1970s, on which the tilde and "home" key (used to move the cursor to the far left) happened to be on the same key.

Related extensions:

In the Linux standard file system, the / directory is the root directory of the entire file system, and all other directories must exist dependent on the root directory, including what is often said home directory.

Where is the so-called home directory?

aaa@bbb:/$ ls
bin  boot  dev  etc  home  lib  lib32  lib64  libx32  lost+found  media  mnt  opt  proc  root  run  sbin  srv  swapfile  sys  tmp  usr  var

You can see that there is a home directory under the root directory, but please note that this is not the so-called home directory, but should be called the user's home directory, or it is more appropriate to call it the user list directory, because This directory contains subdirectories named after all the user names on this machine. Opening one of the subdirectories will actually lead to the user's home directory.

The home directory is marked with the ~ symbol, for example:

aaa@bbb:~$

How to prove that this is the real home directory? You can try to output the ${HOME} variable in the shell:

aaa@bbb:~$ echo ${HOME}
/home/aaa

The path stored in this variable happens to be the home directory of the aaa user. Therefore, it is necessary to clearly distinguish the three directories /, /home and ~.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What does linux server home do?. 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