Friday, September 19, 2008

Linux File System 02 - bin directory

/bin - In contrast to /sbin, the bin directory contains several useful
commands that are used by both the system administrator as well as
non-privileged users. This directory usually contains the shells like
bash, csh etc. as well as much used commands like cp, mv, rm, cat, ls.
There also is /usr/bin, which contains other user binaries. These binaries
on the other hand are not essential for the user. The binaries in /bin
however, a user cannot do without.

Linux File System 01 - sbin directory

/sbin

This directory contains all the binaries that are essential to the working of the system. These include system administration as well as maintenance and hardware configuration programs.

You can find lilo, fdisk, init, ifconfig etc here. These are the essential programs that are required by all the users.

Another directory that contains system binaries is

/usr/sbin

This directory contains other binaries of use to the system administrator. This is where you will find the network daemons for your system along with other binaries that only the system administrator has access to, but which are not required for system maintenance, repair etc



The /usr/sbin directory contains non-vital system utilities that are used after booting (i.e., starting the system) by the system administrator.

This is in contrast to the /sbin directory, whose contents include vital system utilities that are necessary before the /usr directory has been mounted (i.e., attached logically to the main filesystem).

A few of the more familiar programs in /usr/sbin are adduser, chroot, groupadd, kppp, kudzu, ping, setquota, traceroute, userdel and xcdroast.

/usr/sbin also contains some daemons, which are programs that run silently in the background, rather than under the direct control of a user, waiting until they are activated by a particular event or condition. Among the daemons in /usr/sbin are crond, pppd, sshd and xinetd.

/usr/sbin is a subdirectory of /usr, which is used to store many application programs. Another subdirectory of /usr, /usr/bin, contains programs that are not required for booting or repairing the system. The directory /usr/local/sbin is used for locally installed system administration programs.

Because /usr/sbin's programs are not intended for running by ordinary users, it is not in the path (i.e., the set of directories that system searches to find commands) for such users, as is also the case with /sbin. This can easily be seen by using the echo command (which displays whatever follows it or its value) while logged in as an ordinary user to see the value of the $PATH variable (which contains the user's path), i.e.,

echo $PATH

However, /usr/sbin is in the root user's (i.e., administrative account's) path, as can be seen by using the same command when logged in as the root user.

As is the case with any directory, the contents of /usr/sbin can be viewed by using the ls command, i.e.,

ls /usr/sbin

Thursday, August 28, 2008

LPIC Exam 101 - Objective 1 -

This is objective 1 of lpic exam 101

Wednesday, August 27, 2008

Setting a path variable

You need to write the following line in the .profile_bash file for the particular user you want to set the path variable. This file is a hidden file and it is placed in the root folder of the user for example at /home/username directory where username is to be replaced by the name of the user

export variable_name=path

for example

export DROOLS_PATH=/home/drools/

How Display your linux path?

You can display your linux path by writing down the following command

echo $PATH

How to display the list of linux machine users

cat /etc/passwd will list down all of the users.

Wednesday, July 30, 2008

How to list all of the processes on linux machine

You can use the following command to see all of the running linux processes


shell>ps -ax

Free Advertising