Questions tagged [home]

The /home directory or partition contains user-specific configuration files, caches, application data and media files.

The /home directory or partition contains user-specific configuration files, caches, application data and media files.

Separating out /home into a separate partition allows / to be re-partitioned separately more easily.

439 questions
864
votes
2 answers

Why was '~' chosen to represent the home directory?

I have often wondered why the ~ ( tilde ) character represents the home directory of a user. Is there a reason behind this, or is it just because tilde is an infrequently used character?
Lelouch Lamperouge
  • 7,059
  • 3
  • 18
  • 11
56
votes
2 answers

Understanding home configuration file locations: ~/, ~/.config/ and ~/.local/share/

There are a number of hidden configuration files in my home directory: some of them are in ~/ (e.g. ~/.cinnamon ) some of them are in ~/.config/ (e.g. ~/.config/cinnamon-session ) some of them are in ~/.local/share/ (e.g.…
47
votes
2 answers

Does ~ always equal $HOME

I know this has probably been asked before, but I couldn't find it with Google. Given Linux Kernel No configurations that change $HOME bash Will ~ == $HOME be true?
PythonNut
  • 1,474
46
votes
3 answers

Why do some applications use ~/.config/appname for their config data while others use ~/.appname?

I've noticed that some applications put their configuration files to ~/.config/appname while others use ~/.appname (the classic way, AFAIK) for this. What's the sense in this distinction and what could be better to consider for an application of…
Ivan
  • 18,578
46
votes
6 answers

Make pwd result in terms of "~"?

pwd gives me /data/users/me/some/random/folder Is there an easy way of obtaining ~/some/random/folder from pwd ?
43
votes
9 answers

Are there pitfalls to putting $HOME in git instead of symlinking dotfiles?

I have for many years had my entire $HOME directory checked into subversion. This has included all my dotfiles and application profiles, many scripts, tools and hacks, my preferred basic home directory structure, not a few oddball projects and a…
Caleb
  • 72,330
40
votes
1 answer

Is the $HOME environment variable always set on a Linux system?

Assuming the machine is running a Linux kernel, sessions make use of the Bash shell and everything is using default configurations (no user has made any changes to config files), can we assume that the $HOME environment variable is always set?
yanhan
  • 503
39
votes
1 answer

How do Ubuntu and Debian manage $HOME for users with sudo privileges?

I have a bash script myhome.sh containing only one line: echo $HOME The script's owner is a user: $ ls -l myhome.sh -rw-rw-r-- 1 user user <date> <time> myhome.sh In Ubuntu 16.04 and 17.10 I get: $ echo $HOME /home/user $ sudo echo $HOME /home/user…
sinecode
  • 639
37
votes
1 answer

Why aren't crontabs stored in user home directories?

I'm curious to know: why are crontabs stored in /var rather than in the user's home directories? It makes it a total pain to isolate these files for upgrades but I suspect that there is a logical reason...
36
votes
5 answers

How to change the Home directory of the currently logged In user

I am currently logged in into a CentOS server and I would like to change my home directory from /home/myuserName/ to /var/www/html/ I tried the below command : > sudo usermod -d /var/www/html myuserName But this gives me an error: usermod: user…
Mohan
  • 461
35
votes
1 answer

How did the ~/.local/bin thing start? How widespread is it?

I find more and more tools that put executables into ~/.local/bin. I am old and for me ~/bin is the place in my $HOME for executables. Where did this crazy new fashion originate? Why are people doing this? How widespread is it? Is it formalized…
31
votes
1 answer

At what point did the /home directory appear?

Originally in Unix, /usr was used for user (home) directories. So if I had a user named alex , my home directory would be /usr/alex . (Interestingly, Plan 9 , the successor to Unix, still has user directories in /usr .) Nowadays, of course, we store…
strugee
  • 15,621
  • 19
  • 83
  • 122
30
votes
3 answers

Authentication refused: bad ownership or modes for file /var/git/.ssh/authorized_keys

EDIT The issue as exposed here is solved (about files modes of the .ssh folder. But an other issue persists so I create a new question : > Unable to login with SSH-RSA key I can no longer connect with ssh-rsa key for a specific user, but it still…
Rémi B.
  • 985
26
votes
3 answers

How does a shell know home(s)?

Each shell has an environment variable $HOME set (ex: /Users/lotolo ). If I'm under csh I can unsetenv HOME and still if I do cd I'll be in my home. I've tested this also on bash ( unset HOME ) and it's the same behavior. So how does the shell know…
LotoLo
  • 616
26
votes
1 answer

How do I set a user's default .bashrc file?

On Ubuntu 10.4 I have edited the /etc/bash.bashrc file to set some variables like the command history size ( HISTSIZE=5000 ), however if I create a new users Ubuntu by default gives them a .bashrc file in their home directory with this set as…
cwd
  • 47,367
1
2 3
…
29 30