Your Question: How Do I Get to the Users Directory in Linux?
Contents Linux Distributions Use Bash as /Bin/Sh, for Which Tilde Expansion Works. If You Run Echo ~ Using /Bin/Sh Under Some Other Unix Os, You Can Get Back...
Contents
Linux distributions use BASH as /bin/sh , for which tilde expansion works. If you run echo ~ using /bin/sh under some other UNIX OS, you can get back just the tilde (e.g. “~” ) instead of home directory path.
Where is the user directory in Linux?
Generally, in GNU/Linux (as in Unix), the user’s Desktop directory can be specified with ~/Desktop . The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username .
Must Read
How do I access users in Linux?
Get a List of All Users using the /etc/passwd File #
- User name.
- Encrypted password ( x means that the password is stored in the /etc/shadow file).
- User ID number (UID).
- User’s group ID number (GID).
- Full name of the user (GECOS).
- User home directory.
- Login shell (defaults to /bin/bash ).