Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • How to get back permanently deleted files from computer How-To
  • Best calculator big buttons 2020

    Best calculator big buttons 2020. 1 - Calculators for Desk, BESTWYA 12-Digit Dual Power Handheld Desktop Calculator with Large LCD Display Big Sensit

  • Using apple keyboard with windows Tutorials
  • The Most Common Windows 10 Error Messages & How To Fix Them Windows 10
  • How to Buy Bitcoin in India – Step by Step Guide How-To
  • Disable Aero Snap/Snap Assist in Windows 7/8/10 How-To
  • The 10 Best Ad-Free Games on Android 2022 Gaming
  • How to Fix “Windows Could Not Configure One Or More System Components” Error Help Desk

How To Navigate & Use the Linux Directory Structure

Posted on October 7, 2020 By blog_786 No Comments on How To Navigate & Use the Linux Directory Structure

Linux directory systems are different from Windows and can be confusing for new users. So think of the Linux directory structure as a tree. The root of a tree is where it grows from, and on Linux, this is where directories fork.

The directory separator is the forward slash (/), which is abbreviated as forward slash. For example, the path to the root directory is often indicated by a forward slash (/).

How To Navigate & Use the Linux Directory Structure

What is the Linux directory structure?

Those familiar with Linux have heard terms like root, lib, and boot. These are examples of Linux distribution directories.

Linux systems use the File System Hierarchy Standard (FHS). It defines the contents and directory structure of all Linux distributions.

Basic navigation

How To Navigate & Use the Linux Directory Structure

As mentioned above, the Linux directory structure refers to the folder on the hard drive where Linux was installed.

Start by running ls (list of repositories) and press Enter. This command will show you a list of folders in your current working directory.

– /

Remember, each distribution has different folders in its home directory.

How To Navigate & Use the Linux Directory Structure

The list command is used to store a list, but the filesystem starts with a single forward slash (/), so enter the following command:

ls /

How To Navigate & Use the Linux Directory Structure

This will show you the Linux file system directory structure, hard drive settings or default folder structure.

Each folder has its own purpose. The home directory contains users, so use the following command to find out what is in your user’s home directory.

ls / home

To clear the screen, enter clear or use ctrl L. Note that ctrl L may not work on all Linux distributions, but the clear command will.

Let’s go back to the ls command. This is the most important command to know and understand. You want to list items in the directory you are in.

But you can also add additional commands to ls. For example, typing ls -l / will output something other than just /. Try it with the following command:

ls -l /

How To Navigate & Use the Linux Directory Structure

You can see a lot more information on the screen. Everyone is basically on their own line. The -l command means search for a long list.

This means you want to see more detail and also highlight each element on a separate line to make it easier to read. Some distributions will use ll as an alias for -l for the long list command.

Important Folders You Should Know

There are many folders on your Linux system. Below we will discuss the most important ones.

Home Directory

The default home directory is where all users have their personal workspace. Each user will have their own folder in the / home directory.

If you want to see a list of all folders in your home directory, use the following command:

ls -l / home

Since you’re already in your home directory, you can also just use ls to open a list of what’s inside, without using the path.

Each directory in the Linux directory structure is separated by and starts with a forward slash (/). In other words, ls without a path will show the contents of your current directory.

If you want to change the directory you are working in and return to the root of the filesystem, use the following command:

cd /

If you want to see directories at the root use:

ls

Since you are back in the root directory and not your home directory, you will see a list of all folders in the root.

To see a long list in the root directory use:

ls -l

Root directory (/ root)

How To Navigate & Use the Linux Directory Structure

All directories and files on your system are located in the root file denoted by the / symbol. All files or directories start at the root. The path to any file or directory will be displayed like this:

Root / home / user / video

The root directory is for one user and is the most powerful user on a Linux system.

Shared Libraries (/ lib)

The / lib directory contains files containing code (libraries). These files contain pieces of code used to send files to the hard drive, draw windows on the desktop, or control peripheral devices.

Media directory (/ media)

The media directory is where you can see the data files of the connected external hard drives, flash drives, DVDs or Blu-ray discs.

Boot directory (/ boot)

The files and folders required to start your system are located in the / boot directory. Its use is standardized in the Filesystem Hierarchy Standard

The configuration required to boot your machine is located in the boot directory. You don’t want to get rid of this directory.

Some other standard directories include:

  • / dev is where all device files are located, such as an external USB drive or webcam.
  • / var is short for variable. This is where programs store runtime information such as user tracking, system logs, caches, and other files that system programs manage and create.
  • Users’ personal directories are located in / home.
  • / proc contains information about your system, such as the processor and kernel of your Linux system. It is a virtual system.
  • / bin is where all the main executable programs (custom binaries) reside.
  • The / etc folder contains configuration files.
  • Read the Wikipedia summary to find out what each directory is and how it is used.

    Check your current directory

    If you don’t know which directory you are working in, use the pwd (print working directory) command.

    The result will look like this:

    / home / username

    If you then run ls, the default setting will show you the contents of the folder you are currently in, as described above.

    What do the colors mean?

    Let’s say you are in the / etc folder and execute this command:

    ls -l / etc.

    You will see a lot of information as well as many different colors.

    How To Navigate & Use the Linux Directory Structure

    A general rule of thumb is this:

    • Blue is a folder
    • White is a file
    • Green is a program or binary

    Colors may vary depending on distribution. Most, but not all, distributions come with pre-installed colors.

    What are permission strings?

    To the left of the list of each file is a stream of letters. This is called a permission string.

    How To Navigate & Use the Linux Directory Structure

    Look at the first character on the line. The letter d stands for directory. This way, even if your Linux distribution does not use different colors, you will still know that the character string starting with d is a directory.

    Files and programs start with a hyphen (-).

    How To Navigate & Use the Linux Directory Structure

    The letter l refers to a link to another file.

    How To Navigate & Use the Linux Directory Structure

    Quick Navigation Overview

    The ls command list store shows what is in your current working directory. If you don’t know what directory your current directory is in, use the pwd command.

    The beginning of the filesystem is indicated by a single forward slash (/). Use the cd command to switch between directories. To see what’s in the directory you just changed to, use the ls command. Then, to return to your home directory, enter / home / username.

    The cd command helps you navigate the file system. ls shows you what’s in the current directory you’re working in. ls -1 shows a long list.

    Although there are minor differences between different Linux distributions, the file system layouts are very similar. The best way to understand the Linux directory structure is to follow some of the suggestions above and become familiar with how it works.

    Just don’t touch the / boot directory. Practice navigating your system using the terminal. Stick to the cd, ls and pwd commands to avoid breaking anything. It won’t take you long to intuitively figure out where to find documentation, applications, and other resources you need to use.

    –

    Share this:

    • Twitter
    • Facebook
Linux Tips

Post navigation

Previous Post: How to Create a Linux Disk Partition
Next Post: What Is a Chatbot and How To Use One On Your Site

Related Posts

  • Display a List of Recently Installed Software Packages in Ubuntu Linux Tips
  • 10 Most Popular Software Choices for a New Ubuntu User Linux Tips
  • How To Compile Software Packages On Linux Linux Tips
  • 6 Easy Ways To Speed Up Your Ubuntu Installation Linux Tips
  • What is Sudo in Linux command? Linux
  • What Is The Best Linux Distro For Gaming? Linux Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 6 Best FTP Clients For Android
  • MailTag: Real-time Email Tracking, Made Easy
  • Here are the Top 10 highest paid YouTubers of 2017
  • Protect Your Facebook Account From Hackers (2017)
  • 4 Ways to Share WiFi Without Giving Away Your Password
DMCA.com Protection Status

Recent Posts

  • How to use Canva Docs to create documents online
  • PS4 won’t turn on but beeps? 9 Fixes Worth Trying
  • How to Create a Vision Board on Canva
  • How to Cancel Your Wall Street Journal (WSJ) Subscription
  • How to Fix Spotify Lyrics Not Showing Up

Recent Comments

  1. How to Cancel Your Wall Street Journal (WSJ) Subscription on How to Cancel Your New York Times Subscription
  2. How to Fix Spotify Lyrics Not Showing Up on How to Delete or Delete Downloads from Spotify
  3. 6 Best FTP Clients For Android on Disney Plus not working on Fire TV? Try These 8 Fixes
  4. Protect Your Facebook Account From Hackers (2017) on Top 5 Facebook Alternative Apps For iOS Devices
  5. 4 Ways to Share WiFi Without Giving Away Your Password on How to fix if PS5 Not Connecting to Internet?
  • Best cx cas ti-nspire calculator 2020 T
  • What Is UAC in Windows 10 and How to Disable It ? Windows 10
  • How to Use Apple AirPods On a Windows PC Hardware
  • How to Setup a Server on localhost and Install WordPress How-To
  • How to Link All Your Social Media Profiles in One Place How-To
  • 12 Places for the Best Free YouTube Movies for Kids technology
  • How to Watch IMDb TV Outside of the US? How-To
  • 10 Best Nonviolent Video Games for PC, Xbox, PlayStation

    Video games have become an entertainment giant, with games like Grand Theft Auto V making more money than any other entertainment game in history. I

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version