个人工具

UbuntuHelp:HomeFolder

来自Ubuntu中文

跳转至: 导航, 搜索

<<Include(Software/804Template)>>

Introduction

Whenever you add a user to Ubuntu, either by installing Ubuntu or manually adding a new user, Ubuntu creates a /home/username folder for that user with their username. The /home/username folder is often referred to as just "the home folder." This page offers some information about what, exactly, this folder is, what's kept there, and how you can use it.

About The Home Folder

  • You can have as many /home/username folders as you have users.
  • Each user has full read/write/execute access to his or her /home/username folder.
  • Each user can make their /home/username folder unreadable by other users.
  • Each user can fully customize their Desktop layout/background, sounds, window manager, applications, etc.
  • The home folder 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 folders (their names start with a . ) that you should not touch unless you know what you are doing.
  • The only place (with the exclusion of removable drives and the /tmp folder) within the Ubuntu file system where a user can freely create/modify/remove files and folders without needing root permissions or the sudo command.

Installing Software Into The Home Folder

Software can be installed into the home folder, giving users who don't have administrative rights to the system the ability to use applications they'd like. An example of software that installs to the /home/username folder is Wine. You can do this by creating a /home/username/bin folder, compiling software from source and installing it to the /home/username/bin folder, or by downloading binary-only software that you keep in the /home/username/bin folder. 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 folder will be accessible from the command line, or by pressing Alt+F2 in Gnome/KDE/Xfce.

Back Up Your Home Folder

An important thing to consider is how you're going to back up your home folder. Your base system can be reinstalled by using the Live CD or whatever other method you used to install it originally. Since your home folder contains all your personal configuration settings and all the files and folders you've 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: