Introduction
Whenever you add a user to Ubuntu, either by installing Ubuntu or manually adding a new user, Ubuntu creates a /home/username directory for that user with their username. The /home/username directory is often referred to as just "the home directory". This page offers some information about what, exactly, this directory is, what's kept there, and how you can use it.
About the home directory
You can have as many /home/username directories as you have users.
Each user has full read/write/execute access to his or her /home/username directory.
- Each user can make their /home/username directory unreadable by other users.
- Each user can fully customize their Desktop layout/background, sounds, window manager, applications, etc.
- The home directory is:
- Where your Desktop resides.
- Where your documents, pictures, music, videos, audio, and pretty much everything else can be stored.
- Where your application settings are stored, in hidden files and directories (their names start with a . ) that you should not touch unless you know what you are doing. Eg, /home/username/.thunderbird contains your Thunderbird emails and contacts, /home/username/.mozilla contains Firefox bookmarks, passwords, history, plugins…
The only place (with the exclusion of removable drives and the /tmp directory) within the Ubuntu file system where a user can freely create/modify/remove files and directories without needing root permissions or the sudo command.
Installing Software Into The Home Directory
Software can be installed into the home directory, giving users who do not have administrative rights to the system the ability to use applications they would like. An example of software that installs to the /home/username directory is Wine.
You can do this by creating a /home/username/bin directory, compiling software from source and installing it to the /home/username/bin directory, or by downloading binary-only software that you keep in the /home/username/bin directory. Then add the new binary path to your $PATH list, by putting this, for example, into your /home/username/.bashrc file.
export PATH=$PATH:$HOME/bin
Executable binaries/scripts in your /home/username/bin directory will be accessible from the command line, or by pressing Alt+F2 in Gnome/KDE/Xfce.
If you're not sure how to add that line to the file, open a terminal and type gedit /home/username/.bashrc. Then paste the above line at the very end of that file, save it, and close the terminal.
Back Up Your Home Directory
An important thing to consider is how you're going to back up your home directory. Your base system can be reinstalled by using the Live CD or whatever other method you used to install it originally. Since your home directory contains all your personal configuration settings and all the files and directories you have created, downloaded, etc., you'll want to be sure these are kept safe so that you can restore them if necessary. Here are a couple of pages in this wiki with some suggestions:
Preserving home when reinstalling Ubuntu
Since Hardy, Ubuntu can be reinstalled while preserving home even without separate /home: see UbuntuReinstallation.
Sharing home between several Linux distributions
If you wish to share a separate /home between several Linux distributions, do not forget to use different usernames.