I'm learning Linux and I've been practicing some commands. I've come across two directories: '~' and '/home', and I'm a bit confused about how they differ. I tried searching online but I'm still not getting it. Could someone explain the differences in simple terms?
3 Answers
Think of '~' as a shorthand for your home directory path. It’s a quick way to refer to your personal space without typing the full path. On the other hand, '/home' is where all user home directories are stored.
Basically, '~' represents your home directory (like '/home/bob' for user 'bob'), while '/home' is the parent directory containing all user home directories. So, '~' points to your personal space, and '/home' is the overall folder that holds everyone's home directories.
If you're on your terminal, '~' typically means '/home/username'. It's a way to quickly access your files. Meanwhile, '/home' is just the top-level directory containing all users' home directories, so it’s like the parent folder.
Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux