About 528,000 results
Open links in new tab
  1. How to find a user's home directory on linux or unix?

    Jan 29, 2009 · How do I find the home directory of an arbitrary user from within Grails? On Linux it's often /home/user. However, on some OS's, like OpenSolaris for example, the path is …

  2. linux - Difference between $HOME and '~' (tilde)? - Stack Overflow

    Jun 4, 2015 · The shell replaces ~ with the user's home directory (update: or perhaps by the home directory of some other user, if ~ is followed by something other than a /), but only if it's …

  3. What is a cross-platform way to get the home directory?

    I need to get the location of the home directory of the current logged-on user. Currently, I've been using the following on Linux: os.getenv("HOME") However, this does not work on …

  4. Command to change the default home directory of a user

    521 Ibrahim's comment on the other answer is the correct way to alter an existing user's home directory. Change the user's home directory: usermod -d /newhome/username username …

  5. Meaning of tilde in Linux bash (not home directory)

    131 First off, I know that ~/ is the home directory. CDing to ~ or ~/ takes me to the home directory. However, cd ~X takes me to a special place, where X seems to be anything. In bash, if I hit " …

  6. What is the alternative for ~ (user's home directory) on Windows ...

    Nov 13, 2022 · 403 I'm trying to use the command prompt to move some files, I am used to the linux terminal where I use ~ to specify the my home directory I've looked everywhere but I …

  7. JAVA_HOME directory in Linux - Stack Overflow

    Jul 13, 2009 · Is there any linux command I could use to find out JAVA_HOME directory? I've tried print out the environment variables ("env") but I can't find the directory.

  8. How to get $HOME directory when switching to a different user in …

    127 Update: Based on this question's title, people seem to come here just looking for a way to find a different user's home directory, without the need to impersonate that user.

  9. linux - What directory is '~' when I type 'cd ~'? - Stack Overflow

    Feb 14, 2009 · Yes, it is the home directory of the user you logged in as. You can use the command pwd (print working directory) to see where it is located on the file system.

  10. What is the difference between ~/ and ~ in Linux? - Stack Overflow

    Aug 28, 2015 · 15 ~ means the home directory of the logged on user whereas ~/ means the path to the beginning of a directory. From here: The tilde (~) is a Linux "shortcut" to denote a user's …