Using the command line,
environment variables, and navigating through the filesystem
71
The
/.bashrc file is the one that should be edited to change these values for the current user.
Important NoteFiles starting with a dot (.) are hidden files – to see them, you can use the ls -a command.
Navigating the filesystemNow, it’s
time to move into the directory tree of the system. In Linux and Unix (macOS is a Unix- like system,
there are no drive letters, but a single directory tree that starts with the root directory, represented by /. The rest of the content of the system will hang from that folder and any other accessible disk or device will be assigned an accessible directory.
Important NoteThe root directory and the home directory for the root user are two different things. The root user
is assigned the home directory, root, by default, whereas the root directory is the mother of all directories in the system and is represented by We can see which directory we are in by running the pwd command:
[user@rhel-instance
]$ pwd/home/userWe can change the directory by using the cd command:
[user@rhel-instance
]$ cd /var/tmp[user@rhel-instance tmp]$ pwd/var/tmpAs you already know, there is ab shortcutb for the home
directory of the current user,
. We can use this shortcut to go to it:
[user@rhel-instance tmp]$ cd
Share with your friends: