Single linux command to return to home directory


#1

Transfered from Linux Config Disqus comments:

Question:
If you are in a subdirectory such as /PROJECTS/P1/A/A1/A11, what single command would you use to return to your home directory from the current working directory?
Answer:
The easiest but not only way to return to user’s home directory from any directory within a filesystem is to use cd command without any options and arguments.


cd 

it is also possible to use:


cd ~ 

cd $HOME 

cd ~/ 

#2