Thursday, 7 November 2019

LPI 1: Introduction to LPIC-1 Configuring Shells

Configuring shells


Hey there geeks and enthusiasts, I hope your time has been good so far in our lessons. This sequel is going to explore some of the configurations that are undertaken on shells and due to the availability of many shells, we shall be using bash for all of our tutorials.

LPI Study Materials, LPI Tutorial and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA Online Exam

Shells are just like other Linux programs and and are therefore configured through files containing the available optIons in text form. They are bash shell scripts which we shall be exploring much later in our lessons. The configuration files are in two forms:

1.User configuration files: these are local to a specific user and they include the following file
~/.profile,
2.Global configuration files: these affect all the accounts when edited and include the following files
/etc/bash.bashrc, and /etc/profile

Getting Help



LPI Study Materials, LPI Tutorial and Materials, SAP HANA Certifications, SAP HANA Learning, SAP HANA Online Exam
There are lots of commands out there as you have already seen and the brain is not smart enough to remember every option that every command has. For that reason, a help utility known as man pages was created to give a snapshot of a command and to also provide useful options that can be used together with the command.

The manual page of a particular command is obtained by typing
#man then followed by the command such as ls, for instance:

# man ls

The man utility uses a less pager by default and hence displays its contents one page at a time.

In case you are not happy with using a less pager, you can change it to more by using the -P option as shown

# man -P /bin/more cd

The above command will display the manual page of cd using more pager instead of the default less pager.

Further, the manual pages are organized into categories and they are summarized in the table below.

Number What it holds 
1 Shell commands and programs in executable form 
Kernel System Calls 
Program Library calls 
Files stored in /dev 
File formats 
Games 
Miscellany 
Programs run by root 
Routines of the Kernel 

an example is

# man pwd

The above command does return the file format of pwd file instead of returning information about the command itself.
In case you miss the man utility in your distribution, do not fret. There is another utility known as info and may be your distribution may have fancied it. Just type info in place of man for example:

# info pwd

Related Posts

0 comments:

Post a Comment