A question about home directory.

Help with issues regarding installation of Debian

A question about home directory.

Postby hack3rcon » 2019-08-24 12:17

Hello,
When installing Linux, I can define a partition for "home" directory, but why after it, I can see "home" in "/"?

Thanks.
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: A question about home directory.

Postby ruwolf » 2019-08-24 13:01

Can you explain in more details your problem? Because I can see no problem in your current question...
User avatar
ruwolf
 
Posts: 392
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: A question about home directory.

Postby bryanmc » 2019-08-24 13:16

Code: Select all
man mount
bryanmc
 
Posts: 92
Joined: 2016-11-18 12:21

Re: A question about home directory.

Postby Bloom » 2019-08-24 13:53

The separate partition is mounted to /home, so that's why you see it.
If you open a terminal window and type
Code: Select all
$ mount

you can see all mounted partitions including the one for /home.
User avatar
Bloom
 
Posts: 178
Joined: 2017-11-11 12:23

Re: A question about home directory.

Postby hack3rcon » 2019-08-25 06:46

Thanks, but I meant was when I defined a separate partition for "home" then why I can see "home" directory in "/"? The "mount" command show me that the "home" directory is on another partition but why the directory existed to the "/" location? Is it because of Linux structure?
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: A question about home directory.

Postby Bloom » 2019-08-25 06:57

A mount point is an empty directory in the local filesystem. You can have any directory be used as a mount point for a separate partition or a network share.
The system is rigged by default to use /home as the home directory tree, but if you want it on a separate partition the mount point stays on /home but points to that other partition.
I think it's one of the very neat features of Linux (and Unix) that all drives, local or remote are just directories in the local filesystem. That means that no software has to be aware (although it can be if it wants) of the difference between a local drive, another partition or a remote system with a network share.
Although it is possible to relocate the /home directory elsewhere (at work, I work with a legay Solaris Unix system which has my home directory on /export/home/...), I don't advise it because lots of software will expect /home.
User avatar
Bloom
 
Posts: 178
Joined: 2017-11-11 12:23

Re: A question about home directory.

Postby p.H » 2019-08-25 07:23

hack3rcon wrote:when I defined a separate partition for "home" then why I can see "home" directory in "/"?

Where did you expect to see it ?
p.H
 
Posts: 1091
Joined: 2017-09-17 07:12

Re: A question about home directory.

Postby bryanmc » 2019-08-25 13:19

Here is the beginning of the man page for mount. Judging by your last post, I don't think you tried it or read it.

Code: Select all
All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /].  These files can be spread out  over  several  devices.
bryanmc
 
Posts: 92
Joined: 2016-11-18 12:21

Re: A question about home directory.

Postby hack3rcon » 2019-08-26 05:38

Thus, It is because of file hierarchy.
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: A question about home directory.

Postby reinob » 2019-08-26 10:59

hack3rcon wrote:Thus, It is because of file hierarchy.


The thing is you have a home partition, which needs to be mounted somewhere. That somewhere, the mount point, is usually /home. Thus the root partition (/) needs to have an empty directory called /home, on which the actual partition will be mounted.

Note that if you unmount /home, you can then write stuff on the root partitions /home directory. The contents will be hidden (shadowed) when the home partition is mounted on top of it.
reinob
 
Posts: 707
Joined: 2014-06-30 11:42

Re: A question about home directory.

Postby None1975 » 2019-08-26 11:12

/home is a standard subdirectory of the root directory that contains users' home directories. Also, please check this.
OS: Debian Buster / WM: Awesome
Debian Wiki | DontBreakDebian, My config files in github
User avatar
None1975
 
Posts: 922
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable