Looking at the Linux terminal commands and the Man pages.

Screenshot  2014-12-01 13_17_03

Using the Linux command line and the Man pages

In one of my previous post I referring to the differences between Linux and MS-Windows, I talked about the fact that Windows has removed itself largely from the command line interface based on MS-DOS commands, while Linux has stayed very closely connected to its terminal/text command interface history, this being based on shell structures such as BASH or KSH.

Linux remains anchored down to its operating system kernel via a layered human interface structure that firstly consists of its text based shells that are accessed using a terminal application. This Terminal application is booted during the system start up processes. If you install a version of Linux that is intended for server use only then this becomes very clear in that these versions of the OS do not as default install a GUI (Graphical user interface!). It is mainly only the desktop versions of Linux that install a GUI, with many different types being available (i.e. Gnome, Lxde, etc…), these being layered on-top of the terminal layer. Some versions of Linux such a Arch do not start a GUI by default at boot, you start them by using the ‘startx’ command.

Its also worth noting here that the Linux command line is very central on development boards such as the Raspberry-pi’s or Cubieboards, it is less likely that the final versions of many applications for these systems will use a GUI as the overheads maybe to much and one may not be needed in any case!

It is also very likely that you will communicate to these devices over a local network and do so using SSH or TELNET and in both these cases you login directly to the command line layer.

To many users of Linux it is the world of the command line that maybe confuses them the most, if you search the internet as you will need to for support issues it will very quickly be clear that you will need to be able to function as a terminal based users in-order to do anything from install applications, correct system errors or add hardware, Linux has however improved massively over the years with GUI applications now being able to do all these things but most of the help pages online and in printed form publish their instructions using Linux terminal based commands.

So how can you easy a little the process of learning the needed linux commands you will need to know in order to function from a terminal ?

Well one of the features of Linux that I find the most impressive is the (Manual pages : MAN pages ) system. This is one of Linux’s hidden gems and you need to take a close look and this system structure if your going to truly get to grips.

Screenshot  2014-12-01 13_17_02

The MAN page system in Linux is used to access help on not only system commands but on system subroutine libraries and the following areas, all structured into numbered sections as follows:

The manual is generally split into eight numbered sections, organized as follows (on Research Unix, BSD, OS X and Linux):

Section Description
1 General commands
1M System administration commands and daemons
2 System calls
3 C library functions
4 File formats and conventions
5 Miscellanea
6 Games and screensavers
7 Special files (usually devices, those found in /dev) and drivers

Note : You may have also noticed that as a part of most applications that you install, if you look at the text that shows the installation processes taking place, one of the last lines to be listed is a line that confirms a man/help page is being added to the MAN pages.

You can access the MAN Pages system in two ways :

1.. At a terminal window by type ‘man’ followed by the command or object name that you want help on.
2.. By opening the ‘xman’ application from the command line or from a GUI desktop menu or icon.

Terminal Command line usage :

To read a manual page for a Unix command, type:

man

Pages are traditionally referred to using the notation “name(section)”: for example, ftp(1). The same page name may appear in more than one section of the manual, such as when the names of system calls, user commands, or macro packages coincide. Examples are man(1) and man(7), or exit(2) and exit(3).

The syntax for accessing the non-default manual section varies between different man implementations. On Solaris, for example, the syntax for reading printf(3C) is:

man -s 3c printf

On Linux and BSD derivatives the same invocation would be:

man 3 printf

which searches for printf in section 3 of the man pages.

Note : if you want to find out more about using the man pages from the terminal command line just type : ‘man man’

Screenshot  2014-12-01 13_17_02

Xman

I have included some images here of how both the terminal/command line man pages look and how the GUI version ‘Xman’ looks in operation.

Xman is a great utility application as it can guide you to all the installed objects by their sections, along with allowing you to search the entire system for the nameof the object you need help on.

It also just allows you to browse through and learn.

Xman is not always installed by default but it is still available within the X11-tools package in the Linux repositories.

Advertisement
This entry was posted in Linux, Operating systems and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s