Linux Home System Directory – Ls (List Directory) Command Examples – Quick Tips For Linux Commands

0
3

Listing the Linux / home Directory Contents – A System Directory Below The / (Root) Directory

There are several Linux OS system directories located directly below the / and the home directory is one of them.

Now look at the contents of the / home directory contents and learn what the Linux OS uses this directory for.

Listing the System Directories and the / home Directory – Linux ls Command Examples

The following command lists all directories beginning with h, in the / (root), due to h * "pattern".

The ls command options of -l for "long listing" and -d for "directories only" options. You will see / home and possibly (but not likely) more than one.

    $ ls -ld / h *

Viewing the Contents in the home Directory

Now run the following command and you will likely see at least one directory and each name is the "parent" directory for that user's data files.

    Linux Commands Training Tips: A directory with the same name as the Linux user you logged in with should appear.
    $ ls -l / home

Notice that you did not have to change into the path of / home to view the contents because you used the full path.

The User "Home" Directories

On Linux systems, the home directory is the parent directory for each user's directory (except for the root user).

When a user is created, a directory with the same name as the user is created below the path of / home.

For example, when a user named cwest is created, a directory named cwest is automatically created below this path.

The cwest directory is the parent directory for the user's data directories and files and this user has sufficient "permissions" to create directories and create (save) data files below cwest.

The Linux home system directory concepts and the command examples covered here apply to ALL Linux distributions and versions, including SUSE, Ubuntu, Debian, openSUSE, Fedora, Slackware and Red Hat Linux.

Source

Previous articleW3C Standards
Next articleCreating Joomla Site
Building WikiProgramming has been both a personal and professional dream since I was 16. The best way to learn is to teach - and this project allows me to learn while helping others. Its a win win and a way for me to give back. I appreciate any and all support!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.