Interacting with Linux operating system (Command line/shell)

 

 

Hi folks in previous tutorial we have learnt how to install Red Hat Linux. Now its time to interact with system.

To interact with system you have two options

  1. GUI (which we have installed during installation process)
  2. command line interface (CLI) also known as terminal window

You can of course use GUI to familiarize yourself with linux but I would recommend to learn interacting with Linux using command line. In real world majority of linux servers have no GUI(Graphical user interface) . This is to reduce system resource usage and to improve performance.

Default working environment for Linux user is shell. This is place where user/administrator enters commands which are then executed by operating system. There are different shell environments but bash is common. In this series whenever we say shell it means bash shell.

Shell is like interpreter. It interprets commands entered by user and validates whether command is correct.

How and which command to Use (use man command)

In Linux there are approx. 2000 commands. You can never remember all of them (syntax and switches). One important command can help you to get information about each command in man command. Man (manual) command is very useful and you can find almost all Linux command syntax and their usage with different switches.

As there are different distributions of Linux operating system. The man pages are personalised to the particular operating system, and version thereof, on which they are installed. This is useful because there can be slight differences in commands and other items according to the particular system.

The man command itself is extremely easy to use. Its basic syntax is

man [option(s)] keyword(s)

man is most commonly used without any options and with only one keyword

For example, the following provides information about the ls command (which is used to list the contents of any specified directory):

man ls

lscommandhelp

As another example, the following displays the man page about the man pages:

man man

manman

man description

If you exactly don’t know name of command and you want to search for that command you can use switch k with man.

(man –k and  part of command)

e.g man –k  ntp it will display all commands which have ntp in name and then you can select appropriate command see below example

[ali@rhel71 ~]$ man -k ntp

man-k-ntp

In this tutorial we have learnt how to start terminal window and type few basic commands. In next tutorial I will show you guys how to connect remotely to linux server using a tool putty(using ssh protocol). Thanks for visiting my website. Your comments/feedback regarding tutorial will be highly appreciated

SUBSCRIBE OUR NEWSLETTER
I agree to have my personal information transfered to MailChimp ( more information )
Join us by subscribing to our newsletter and learn IT subjects for free
We hate spam. Your email address will not be sold or shared with anyone else.