Home Directory (
On Unix and Linux, every user has a "home" directory. This directory is yours and yours alone. The location of your home directory varies depending on which OS you use. For example, on Mac OS it is /Users/<username> but on Ubuntu system, it is /home/<username>.
Finding your home directory is easy. When you first log into your system you will be placed in your home directory by default. With this knowledge, you can use
pwd (print working directory ) command to get the path of your home directory.
$ pwd /Users/robin
Your home directory will be where your settings files get stored and where your desktop is kept. The home directory (or subdirectories under your home directory) is also where you will save documents and files that are yours and not to be shared with others.
By default, your home directory will be unreadable and inaccessible to all other users apart from yourself (and root). You can change these permissions if you want.
It is quite common to see a tilde (
~ ) in place of the full path for a home directory.
$ ~ -bash: /Users/robin: is a directory
~ will expand to be the path of your home directory when you use commands such as
$ cd ~ /Users/robin
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync