Professional Documents
Culture Documents
Notes: 2.3.2 Navigating in The File System
Notes: 2.3.2 Navigating in The File System
Notes: 2.3.2 Navigating in The File System
/mnt This is a generic mount point under which you mount your filesystems or devices. The
process by which a filesystem is made available to the system is known as mounting. After
mounting your files will be accessible under the mount-point. This directory usually contains
mount points or sub-directories where you mount your floppy and your CD. You can also
create additional mount-points here if you want. There is no limitation to creating a mountpoint anywhere on your system but convention says that you do not litter your file system with
mount-points.
Notes
/opt All the software and add-on packages that are not part of the default installation are
contained in this directory. Generally you will find KDE and StarOffice here. Again, this directory
is not used very often as its mostly a standard in Unix installations.
/proc This is a special directory on your system.
/root This is the home directory of the user root. This is not to be confused with the system
root, which is directory at the highest level in the filesystem.
/tmp The files that are required temporarily are included in this directory. Many programs
use this to create lock files and for temporary storage of data. On some systems, this directory is
cleared out at boot or at shutdown.
/usr - This directory contains all the user binaries. X and its supporting libraries can be found
here. User programs like telnet, ftp etc. are also placed here. /usr/doc contains useful system
documentation. /usr/src/linux contains the source code for the Linux kernel.
/var - This directory includes spooling data such as mail and also the output from the printer
daemon. Also, the system logs are also kept here in /var/log/messages. You will also find the
database for BIND in /var/named and for NIS in /var/yp.
29
Notes
Now, we can type any location into the location bar. The contents will be displayed at that
location. On the other hand, we can select the button marked Up in order to make Nautilus show
the contents of the parent directory instead. Thus, we can navigate the whole way up to the root
directory (/ ). All the top-level directories of the computer can be found in the root directory. In
order to navigate inside the directories, simply doubleclick on the directories.
Generally, the file system navigation by means of the file manager is very intuitive. If you are
familiar with an operating system based on GUI, then you will see yourself right at home with
Nautilus.
Self Assessment
Fill in the blanks:
5.
....................................... makes a file or directory visible in multiple parts of the systems file
tree.
6.
....................................... directory contains all the binaries that are essential to the working of
the system.
30
Notes
Source: http://flylib.com/books/en/1.65.1.26/1/
Area
Description
CPU
Memory
Network cards
Mouse
Keyboard
Display
The display card detected by the system and its current usage status.
Sound
Operating system maintains some special files in a dynamic manner. A lot of information can
be found by using these special files. These files are located in the /proc directory. We call these
files special as operating system generates them on demand. Also, these files are not actually
available on the file system except when requested (for instance, by the ls /proc command).
The cat command can be used to view the contents of these files. On the other hand, we can make
use of a text editor like gedit.
CPU-related Information
We can find out the CPU information discovered by the operating system by displaying the
contents of the file /proc/cpuinfo. This is displayed as below:
31
Notes
Source: http://flylib.com/books/en/1.65.1.26/1/
The value of bogomips specified at the bottom of the display is an approximate calculation of
the processors speed. We can use this figure to get an approximate comparison of the relative
speeds of two different computers running different processors.
The usage of CPU can be found in various ways. There is a graphical tool known as the System
Monitor. We can launch system monitor by choosing Main Menu System Tools System
Monitor. In this application, the System Monitor tab displays the usage of CPU over time in a
graphical format which is shown as below:
Figure 2.14: System Monitor Tab
Source: http://flylib.com/books/en/1.65.1.27/1/
Besides the CPU usage information, the System Monitor tab also gives information on memory
usage and mounted file systems.
32
Notes
Notes Actually, Swap memory is not a memory in the conventional sense. It is a disk space
which is used by the operating system in order to store information for the time being.
Memory-related Information
To determine information regarding the total amount of RAM in the system and the amount of
swap memory, we can look at the System Monitor dialog. Another quick option for determining
the status of RAM and swap is to display the contents of the file /proc/meminfo. This is shown
as below:
Figure 2.15: Example of Command /proc/meminfo
Source: http://superuser.com/questions/521551/cat-proc-meminfo-what-do-all-those-numbers-mean
We can also examine the usage of memory via the System Monitor or the top program.
33
Notes
Source: http://flylib.com/books/en/1.65.1.26/1/
In the figure shown above, the -h option shows the output in a more readable format.
If using a hard disk with multiple partitions as well as multiple operating systems, it is useful to
be able to check the hard disks partition structure and the different partition types obtainable on
it. We can show this by using the fdisk program, with the 1 option.
The superuser mode is showed by the change in the prompt. That is, the last character of the
prompt changes from a $ sign to a # sign.
The l option is utilized to query the hard disk structure, and is quite safe. On the other hand,
other fdisk options manipulates your hard disk partitions, and erroneous usage of these options
can demolish the data of hard disk.
Caution It is essential to make use of the fdisk program only with care.
Network Cards
As a Linux user you should know about some network properties like network card name,
speeds, driver details etc. Here we will discuss the same with help of examples.
Example 1: Find all your network cards (Ethernet, Gigabit Ethernet, Wireless) names attached to
a given system.
Command
ifconfig | cut -c1-8 | sort -u
Output
eth0
lo
virbr0
wlan0
Example 2 : find how many network connections(network cables are connected to your machine)
are active i.e. link is up.
Command
ip link show
34