Now we're going to have a look at and talk about some of the "main" Linux system directories.
Logging In as "Equivalent to root" To See Some System Direcotories
You will need to log in and "work as root" to view the contents of the Linux system directories below.
Run su - (and be sure to use the dash) to do the equivalent of logging in as the root user (unless you're working on Ubuntu or a variation of this distro).
If you're using Ubuntu, Kubuntu or another variation of this distro, run the sudo command with the -i option to do the same as above.
The /lib Directory
This directory contains essential common library files that are used by various Linux software programs.
A library file contains commonly used software "routines" that can be used by many different programs on the system.
So, instead of a programmer having to create code for commonly used program tasks, he or she can use a library that contains the code for these.
$ ls -l /lib | less
Scroll down through the list to see the names of the library files.
Press q to quit out of the "less interface".
The /lost+found Directory
When files become corrupted on a Linux system, the fsck (file system check) utility is run to check and repair files.
If this utility finds parts of files (without fil names) it puts them in this directory.
$ ls -l /lost+found
This directory will likely be empty.
The /media Directory
This directory is used to provide access to various types of "media", such as a CD, DVD or Flash drive.
$ ls -l /media
This directory may be empty or may contain subdirectories, such as a cdrecorder directory (for CDs).
The Linux system directories and command examples shown here apply to ALL Linux distributions, including SUSE, openSUSE, Ubuntu, Debian, Fedora, Red Hat and Slackware Linux.
No comments:
Post a Comment