11

Very simple question. When I am in my home directory in terminal and type pwd I get /home/<myusername>. And it is the same directory when I am in Nautilus Home section:

Ubuntu and Lubuntu file managers:

enter image description here enter image description here

So why is the same directory but it's called different ways? It's sometimes confusing when going through the directories in terminal.

5
  • 1
    If I remember correctly, until a few years ago, that folder actually appeared as <username> in Nautilus. Jun 19, 2014 at 18:25
  • Indeed, nautilus 2.24.2 on my system displays the user name in its Places panel, address bar etc..
    – Ruslan
    Jun 19, 2014 at 19:01
  • When you tell your friend, "I am going home", you don't qualify it with whose home it is. Nautilus' GUI does this as well - for the most part it feels more natural (Nautilus: "User, where do you want to go?" User: "Home"). Maybe Ubuntu should use /homes/* for the directory name; although Linux in general prefers the singular (for reasons unknown).
    – Jason C
    Jun 20, 2014 at 13:29
  • @JasonC it's not for reasons unknown, it's due to FHS, which itself is based on original UNIX distributions.
    – Ruslan
    Jun 20, 2014 at 20:17
  • 2
    @Ruslan Yes. With original UNIX distributions preferring the singular for reasons unknown (also "bin", "lib", "dev", "mnt"). By contrast Windows prefers the plural ("Users", "Program Files", "drivers"), for equally unknown reasons. OS X is not consistent (FHS roots, then "Applications", "Preferences", "Users", "Volumes", but... "Library"). Just minor cultural quirks, which I guess are totally boring to pretty much everybody but me. :)
    – Jason C
    Jun 20, 2014 at 21:03

6 Answers 6

20

The "Home" in nautilus is simply a link to /home/<username>. It is the same way that windows puts different names (.e.g. "My Documents", but it's "Documents" in terminal).

It is to make it more user friendly, they want your "Home" space to be obvious how to find. It is only more advanced users that find that it is different - so you don't get conflicts with other users. It's also easier when helping someone remotely, to say "Click on home"

Typically, your home folder is /home/user but this is optional. A system administrator can put it anywhere, and nautilus's Home link will redirect to the new place, if it is set in /etc/passwd.

My pronouns are He / Him

2
  • 1
    It's convention for user home directories to be under /home/user but they don't have to be. The system administrator can put then anywhere. The location if each user's home directory is actually determined by /etc/passwd. Nautilus etc is simply looking up the location of the current user's home directory (from $HOME, which in turn was set by /etc/passwd) and calling that "Home". Jun 20, 2014 at 3:58
  • I'd also add that in the case of Windows this is (as far as I know) due to legacy reasons. For example, earlier versions used localized names for special folders (e.g. documents used to be "My Documents" or "Eigene Dateien"). Some programs still use hardcoded paths (and users might be used to them as well), so newer versions still provide aliases to those locations.
    – Mario
    Jun 20, 2014 at 9:53
17

It is called the user's Home directory, even when working from the Linux Command Line. All the directories under /home are called Home directories, they are grouped together for the sake of simplicity. Think of it this way: Just like /bin stores binaries, /home stores Home Directories.

So when Nautilus tells you the directory is "Home", it is literally "Your Home Directory", and therefore not a misnomer at all. It's the culture of Linux.

Another person pointed out that the $HOME environment variable is set to a user's Home Directory. The name for the variable has the same reason behind it as the name "Home," namely it's the culture.

Why is it the culture?

In an ideal Linux instance, everything the user does, all custom configuration, all documents, files of any kind, will exist inside that folder. It belongs to the user, it's in the user's Home Directory. That means the user can keep to himself, and makes knowing where your stuff is a bit easier. The computer kernel, programs, boot controls, all the stuff needed to run the computer, can go everywhere except inside the user-generated space, their home directory. Linux doesn't install any programs inside the home directory (third party programs might do this anyway), and there is always a system-wide configuration that a user could override if they want. The override configuration would be, of course, in their home directory. If you went from one Linux computer to another, and all you brought with you was your home directory, if the other computer [was set up to see you as a user, and] had the same programs installed, it would be almost as if you were on your original computer.

4
  • 2
    On the contrary. This is why. It is called Home because it is the user's Home Directory. That's why they are in /home, just like /bin stores Binaries, /home stores Home Directories. Jun 19, 2014 at 19:03
  • Yes, my bad, sorry :)
    – Tim
    Jun 19, 2014 at 19:23
  • 1
    Well explained sir. Jun 19, 2014 at 20:04
  • 1
    Would be good to mention $HOME environment variable to make argumentation even more convincing.
    – Ruslan
    Jun 20, 2014 at 11:36
7

The HOME environment variable stores the path of your /home/<username> directory.

$ echo $HOME
/home/avinash
$ pwd
/home/avinash

So when you are in /home/<username> directory(nautilus), its corresponding variable HOME is displayed.

0
3

A user's Home folder is, conceptually, their own personal space within the filesystem. It's the place where they can do (almost) anything they want without having to worry about messing up the system in general. Ubuntu puts most people's home folders as /home/[username] by default, but they can go just about anywhere in the filesystem. They can even be changed, though that isn't just a matter of dragging the folder to another place: you'd need to dig fairly deep into the system configuration to do it.

Ubuntu, Lubuntu, and other systems sometimes have their own names for this folder within their user interfaces. This is because, unlike Mac OS X or Windows, there is no single team that works on "the Linux GUI". In fact, there's no single piece of software that can be called "the Linux GUI". There are many different distributions derived from Ubuntu, but for many of them, the choice of which GUI they use by default is the biggest difference between them.

There is no single team that works on all of these GUIs: each one has its own. There are some standards that the different GUIs use to interoperate with each other, but there is no unifying standard for naming things like the home folder, so different GUIs do it differently. That's what you're seeing here.

0

Using a generic label for the home folder is beneficial to any OS that offers customer support.

It's much easier to walk someone through clicking on "Home", than it is to walk someone through, "Home folder... with your username... what's your username on the machine?... that's your full name that displays for the login manager, but you should have a username without any spaces in it... OK, just read me all the folders you see..."

0

Different label, same core concept. Home folder of user is /home/ and reference by environment variable: HOME. In general, there is a config file to setup it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .