Hardware Reference
In-Depth Information
ls
doesn't display any files or folders that begin with (
.
). The reason
for this is that any file or directories beginning with (
.
) are hidden.
The
ls
command has many different options that change the output on your screen.
Some common
ls
parameters are as follows:
Option
Description
-a
This shows hidden files and folders
-l
This uses the long list format. This will show file sizes, file permissions, and the
owners of the files
-h
This shows all the files sized in a human-readable format
cd
The Linux filesystem is made up of many different files and folders. When using
bash, it is really important to be able to move around the filesystem. This is done
using the
cd
(change directory) command.
cd
is easy to use. All you need to do in order to change the current directory is to run
cd
followed by the path of the folder you want to move into. This can either be an
absolute directory or a relative directory.
Changing between directories
The directory that you are in after you run
cd
is called the current working directory.
Unless you specify, a directory bash will look for any commands that you run and
any files that you are using in the current working directory. If the command is
not in the current folder, bash will look in several other predefined folders for the
command. These folders are specified in the
PATH
environment variable in bash.
pwd
Sometimes, when navigating the Linux filesystem, you might need to find out which
directory you are in. You can do this using the
pwd
(print working directory) command.