Use the 'cd' command without any target; that always puts you in the home directory which becomes by default the working directory.
the command 'cd ~' will get you there .
The root directory is the top level directory of the entire file system. Every branch starts from there. The current working directory is where you happen to be in the tree at the moment. If the root is always "/" and my process is in the directory /usr/local/bin/test/data, then the root directory is still "/" and my working directory is currently /usr/local/bin/test/data
The pwd command prints the working directory. The working directory is the directory you are "in", where operations on files that don't have an absolute path specified will be performed. For instance, if my working directory is /home/username/stuff, then the command echo "test" > test.txt would place the file test.txt in that directory.
All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path
The command 'pwd' will identify the full path of the present working directory.
pwd - means print working directory, which is always the current directory.
The root directory is /. The home directory is /home/user.
The command pwd displays your current/present working directory.
Each user (on a multi-user computer) has a home directory, and it is the first directory shown after a user logs in. For instance: rodney@downstairs:~$ shows that my user name is rodney, my host or computer name is 'downstairs', the tilde '~' shows that I am in my home directory, and the dollar sign '$' shows that all is ready for me to type in a command. Typing the command 'pwd' (without the single quotes) in a terminal will show which directory you are in - pwd means 'print working directory'. The command 'ls' will list all directories.
The default home directory is /home/user (where "user" is the username), sometimes shortened to "~".
"cd" with no directory takes you to your home (login) directory. In a path, ~ (tilde) means your home directory, ~usr means the home directory of user usr. For example, "cp ~/foo ~john" copies file foo from your home directory to john's.
"/" is the root directory in Linux. Make sure not to confuse this with the "/root" directory, which is the home directory for the user "root" (similar to "Administrator" on Windows)