System files are all the directories (folders) under /
(which is often referred to as your "root directory") that are not under /home/
.
A few examples are /etc/
and /usr/lib/
and /bin/
and your "root directory" /
which all of these are under.
Your personal files, like data, text, pictures, and others are under your /home/
directory and are under what we refer to as your "user's home directory" which would be /home/codinggirl/
if your user name were "codinggirl" for example.
However, there are some system files under your user's home directory as well and these are usually hidden files and directories that start with a dot, like /home/codinggirl/.config
for example, which contain configuration files for your personal settings.
Additionally, it should be noted that the "tilde" ~
symbol can be substituted for /home/codinggirl
so that ~/.config/
is the same as /home/codinggirl/.config/
and ~/
is the same as /home/codinggirl/
.
To print (show) your current working directory, run the following command:
pwd
To list the files in your current directory, run the following command:
ls
To list the files in your current directory and to also list hidden files and directories, run the following command:
ls -a
To change to a different directory, you can use the cd
command. For example, if you are currently in your user's home directory, you could use the following command to change to your Downloads directory:
cd Downloads
Alternatively, the following command will do the same thing by listing the full path to the directory:
cd ~/Downloads
However, to go back one directory, you can use two dots before a forwardslash like this:
cd ../
and if you run the cd
command with no argument, it will take you back to your user's home directory:
cd
Also, the current directory is always represented by a dot before a forward slash ./
So, another way to change to your Downloads directory from your user's home directory would be to use the following:
cd ./Downloads
or
cd /home/codinggirl/Downloads
and to go back to your user's home directory, from your Downloads directory, you could use
cd ../
or
cd
or
cd ~/
Partitions are usually "mounted" to a directory so, unlike Windows, the partition will be listed under the directory name (folder name) it is mounted to instead of listed as a partition or drive like "drive C:" as it is in Windows.
For example, if Ubuntu is installed under a single partition, your equivalent of a "c: drive" on Ubuntu would simply be /
For another example, you could also have a separate partition or drive mounted to /home/
. If you have another partition or drive mounted to /home/
, that partition or drive would simply be under /home/
.