Tag Info

Hot answers tagged

437

Quoting Wikipedia: On Unix-like operating systems (including BSD, GNU/Linux and Mac OS X), tilde often indicates the current user's home directory: for example, if the current user's home directory is /home/bloggsj, then cd, cd ~, cd /home/bloggsj or cd $HOME are equivalent. This practice derives from the Lear-Siegler ADM-3A terminal in common ...


14

~foo means 'the home directory of user foo'. This isnt done by the kernel, its interpreted by the shell. Whenever the shell sees ~foo as an argument, it transparently replaces it with the home directory of user foo and passes that in its place. So when you run cd ~tandu, the shell is actually running cd /home/tandu.


11

Because those applications that place configuration files in $HOME are ignoring the XDG Base Directory Specification, notably: There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME... If $XDG_CONFIG_HOME is either not set or empty, a ...


11

One day you're going to change your computer, or to give someone else (a family member, for example) an account on your computer. If you want to keep a setting on your next computer, put it in your home directory. If the other person might want a different setting, put it in your home directory. If the setting is computer-dependent and not user-dependent, ...


10

A user's home directory is the initial directory when a user logs in. Normally the user may create files and directories only in in home directory (apart from temporary directories). Also various settings (user specific startup files and such) are usually stored in the user's home directory. Server is just annother name for a host (a computer). Think of a ...


9

~ is an alias for $HOME provided by a number of shells, but $HOME is more universal. $HOME actually asks the shell to insert (substitute) the environmental variable HOME here. There are quite a number of different environmental variable that can be substituted, try running env for a list. Note that ~ is not always recognized when it's not at the beginning ...


8

Inkscape, being a GTK application, uses the GLib g_get_home_dir function to find the user's home directory. As documented in that link, g_get_home_dir does not consult $HOME, but rather /etc/passwd. You'd have to patch Inkscape to check $HOME first (as shown in that link).


7

Yes, but not advisable (as FAT doesn't support permissions). There are a couple of options you could consider: install the ext2 Windows driver mount the FAT partition inside /home/$USER/<mount-dir> Either way the drive will be accessible by both systems.


7

While they are quite reliable (no moving parts), SD cards/USB flash drives can be slower (you probably do not want to run disk-intensive operations from there) and have limited write cycles. From this Super User question: Flash memory indeed has limited write cycles. However, by now it is unlikely that you'll encounter this within the normal lifetime of ...


6

That line in your .profile should be one of export PATH="$PATH:$HOME/Unix/homebrew/bin" PATH="$PATH:$HOME/Unix/homebrew/bin" PATH=$PATH:$HOME/Unix/homebrew/bin PATH=$PATH:~/Unix/homebrew/bin The ~ character is only expanded to your home directory when it's the first character of a word and it's unquoted. In what you wrote, the ~ is between double quotes ...


6

I do this and it works just fine for me. But I only use it on one computer; the biggest problem I see with using the same card for two means you can only use one at a time. Just something to watch out for: I ran into a bit of trouble because the system was trying to mount the /home directory before the SD card was detected, aborting the boot process. I had ...


5

As Noufal Ibrahim says, I think this is a Solaris convention. IIRC, /export/home is used on the server where the actual files live, and /home is where the other servers mount it. What does mount | grep home say? I'm guessing that /export/home has a file system type of UFS, and /home has a type of NFS? /etc/fstab may also have some clues.


5

You probably won't be able to manually un-mount devices that contain root and/or home filesystems: too many processes will have one or the other as their current working directory. So that can't be your situation. Disadvantages: Requires root to mount or unmount. Easy to forget to do, causing extra puzzlement. Advantages: A disk un-mounted when a ...


5

A complement to jasonwryan's great answer, addressing some of your issues: Your $XDG_CONFIG_HOME is not set to ~/. It simply isn't set. So applications that follow the XDG Speciifcation use the default ~/.config The dirs inside /.config are not hidden because they don't have to. The whole point of using a ~/.config dir is to un-clutter the user's $HOME. ...


5

I wouldn't want my entire home directory checked into version control simply because it means every subdirectory I go into would have the version-control context of my home dir. Commands like git checkout would have an actual action in that case, causing issues if I accidentally run something from the wrong directory, whether that something is git itself or ...


5

The .config directory is a newish development courtesy of XDG that seems, deservedly, to have won favour. Personally, I don't mind a dot directory of your own. A bunch of separate dot files (ala bash and various old school tools) in the toplevel of $HOME is a bit silly. Choosing a single dot file is a bad idea, because if in the future you realize maybe ...


4

I assume that your gateway device to the internet does NAT (network address translation), i.e. your home network uses for example a private network like 192.168.0.* and you dynamically get one IP from your ISP which is used by the gateway. In that case someone on the internet only is able to access port 80 on your home network web-server, when you have ...


4

If you just want to disable it: update-rc.d -f gdm remove If you want to remove it: apt-get remove gdm You only have to address the gdm package to keep X from starting. And yes, it is perfectly safe. Also, depending on what version of Debian your CrunchBang server is based off of, you may be dealing with gdm3. If so, just replace gdm with gdm3 in ...


4

I've tried both, and preferred the symlink approach in the end: Check out to wherever make install Log out and in again to load the X settings Disadvantages: Have to move files to the repo before adding them Have to maintain the list of symbolic links in the Makefile Advantages: No need for a massive .gitignore (I have 133 dotfiles in ~ on my ...


4

I've ran an entire system from an SD card before (over USB 1.0!) It was extremely slow. I was running OpenBSD. It has softdep which increased performance by a large amount, though that doesn't transfer to Linux. I'd say the biggest thing to make sure of is that you mount it with noatime, this way, you don't get penalized by every read you do. Also, you ...


4

As for the tutorial, search engines seem to work, e.g. this one on howtoforge.com seems to give reasonable hints. Generally you might want to reconsider what exactly you are trying to achieve in the end. While eCryptfs will (to some degree) guarantee confidentiality you should be aware of several things: to hide the contents of home directory from other ...


4

A user's BASH environment variables can be defined in ~/.profile. Add a line to this file: export PATH=$PATH:~/bin To read the new PATH variable now: . ~/.profile or source ~/.profile (The . and source are synonyms.) Then to see that the PATH variable was updated: echo $PATH Update I have never seen {} in a PATH environment variable? ...


4

Your home directory is meant to be used for your own files, which means that you definitely can use it with different distributions. Problem can arise if you use different version of the same software, older one could break because of incompatible changes in config files, but that should not be the case if versions are not very distant.


4

$HOME is not set in cron, so put this in a script, and let your cron job execute that instead, (Remember to set the execution bit for that script with chmod +x XX) #!/bin/bash mateconftool-2 -t string -s /desktop/mate/background/picture_filename ~/Pictures/daily Or in your cronjob, HOME="$(getent passwd $USER | awk -F ':' '{print $6}')" ...


4

Both ext3 and ext4 are journaling filesystems, in addition this list several differences, the most relevant are: Maximum individual file size can be from 16 GB to 16 TB Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte). Directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 ...


4

There are ways to install rpms in a user directory using rpm, but I don't believe it is straight-forward. I don't believe there is a way with yum. My standard practice has become to compile from source to a local directory in my home $ mkdir ~/local $ mkdir ~/local/bin $ mkdir ~/local/lib $ mkdir ~/local/include I download source as I would to ...


3

This Trash file is unrelated to Postfix. It's also probably not what you see over IMAP: while the IMAP server could be configured to serve this file as a mail folder called Trash, it's likely that it's showing a directory called Trash near other directories that you see over IMAP. The mail you show is an oddity of Pine. It's likely that you used Pine at ...


3

If its debian based you should be able to use apt-get remove to remove the packages associated with X. Alternatively dpkg --remove should also work. Here are the packages associated with X on my Ubuntu machine: gdm xserver-common xserver-xorg xserver-xorg-core xorg x11-common x11-xserver-utils Since both apt and dpkg handle dependencies, I'd think ...


3

Yes, the home directory of the current user should be whatever the environment variable HOME indicates. There is, of course, a global system setting: the entry in /etc/passwd, or more generally the home field in the user database. Applications are supposed to use that setting only to look up a user other than the current user, or if there are security ...


3

This is happening because ~ has not been expanded. Your shell knows how to deal with this, but which does not (nor would most other programs). Instead, do: export "PATH+=:$HOME/Unix/homebrew/bin" Alternatively, stop using which, and use the (almost always superior) type -p. Here is a demonstration of the issue: $ echo "$PATH" ...



Only top voted, non community-wiki answers of a minimum length are eligible