What is the “~/” directory?

I’m trying to locate where some files are stored and I can easily browse to them via ssh by going to “cd ~/foldername”, however, I have no idea what directory “~/” actually is.

When I browse around folders via WinSCP (yes, I’m a Windows admin), I can’t seem to locate this folder at all.

Note: I’m using Amazon Linux on EC2.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The tilde character is shorthand for the home directory of the current logged-in user. If you are logged in as jason, then ~ is likely /home/jason/. It is the home directory of any username, as given in /etc/passwd. It is also the same as the $HOME environment variable. The expansion from ~ to the home directory is done by the shell.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x