Home / UNIX / Basic Linux Commands With Syntax And Example

Basic Linux Commands With Syntax And Example

Commands:

The command is a pre-defined word that contains a special task and executes at the command prompt. Unix operating system allows us a feature to define the user instructions in the form of commands and execute the output at the command prompt. The Linux system provides GUI component to execute the user instructions. We use alt+ctrl+F6 for command prompt. The command interprets by the shell then transfer to the kernel for execution. The kernel is the core of the operating system that is able to execute the command and return output. A command also used argument for defining the commands values. The system checks the command name and its related arguments. A key ctrl+c is used to terminate the executing command.

1. Simple Command:

Unix operating system allows us different types of commands for executing the user instructions and manage the user resources.

A) Date Command:

It is a command that displays the current system date and time. We can also configure the system date and time with the help of this command.

date↵

B) Cal Command:

It is a command that displays the calendar details. It means the Unix operating system contains details of calendar and date & time. We can also pass the month and year with this command to shoe this calendar

cal↵ →show current date

cal 2014↵

cal 5 2014↵

cal 6 2050↵

C) We Command:

It is a command that counts a number of characters, number of lines and number of a word from the particular content or file. In this, we pass the file name with this command as input.

option→It is an option that displays:

-l→number of lines from the file content.

-c→it is an option that counts the number of characters.

-w→It is an option that counts the number of words.

2. Getting Help:

Linux Unix operating system is used to execute the application programs with the help of command and graphical tools. Unix as help to the user with descriptions of the building commands. This operating system contains a file with the description of existing commands are used in these operating system so too difficult to remember by the user. So, it provides a help book with details of particular commands. The user can display the details of command like its description, arguments, and other details.

A) What is the command:

It is a command that displays the details of a particular command. It accepts the name of another command as its only argument. It sums the command details from the database and displays short description to the user.

Example- what is command name.

B) Help Command:

It is also a command that displays the help of particular command with a description of existing command. This command displays the command details, command arguments, command operators etc. It also displays the option of particular command also we use command name then help command to display the details.

Example-cal–Help↵.

3. The Man Command:

It is a command that allows displaying the information about the pre-defined command some as help. The operating system uses a documentation for maintaining the description of commands. The Unix operating system also maintains a manual of the operating system and display the description also. The description of commands are maintained into different pages, so we use keys to navigate the page. We pass the command name as arguments to display the help of existing command. The man commands display different pages that are associated with user commands, system calls, library calls, file format etc. Linux command contains the short description, options, files etc of the given command. We use page up and page down key to navigate the help page. It provides different options like -c for configuration files, -m for a path, -a manual page and -h for online help. This command also allows searching the manual page with the help of particular path. In this, we pass a path with / separator. This command also helps to search zip file.

Example- MAN<command name>

Man c↵

4. The Info Command:

There are different help command used in Linux system to display the description of the particular command. Linux system allows controlling the user instruction with GUI component. Info is a command that also displays the description of particular command with GUI utilities similar as man pages while man pages are generally written as a quick reference rather than an instruction to a command, Info pages are much more easy to find the more details of the command and navigate the pages. The structure of info pages is similar to website pages. The user can easily switch to another page same as web pages. It also displays the description of the command with the command name, description option etc on the info page.

Info <command name>

info c Ø↵

The pages of this command are navigated with the help of page up and page down and use arrow keys tab to switch from one option to another. We use q to quit from the info page.

Extended Documentation:

The application program is managed with different instruction and built-in programs. It also maintains the documentation of the program as help book. The user can manage the command details using documentation. The documentation is stored in particular directory into the system. The user can excess the file from /user/src/Linux/documentation. These directories contain useful information that might not be a man page they also contain template and configuration files as documentation. The content of this directory (/user/src/Linux/documentation/doc book) is written in doc book but may be converted to PDF docs, HTML docs respectively.

Red Hat Documentation:

Linux-Kernel commands
image source:-http://tutorialpoint.com

Red Hat provides additional documentation with individual applications. This documentation is available in particular format on the documentation Cd or www.Redhat.com website. The documentation information about the built-in commands. It maintains the installation guide, deployment guide, and virtualization guide. The system planning guide provides a high-level overview of Red hat operating system and services, the installation guide and deployment provide in Red hat enterprise Linux and maintain depth.

About Parichay

Check Also

Types Of Shells And Shell Commands

Shell: It is a program that interprets the commands and transfers to the kernel for execution. …

2 comments

  1. Nice work keep it up

Leave a Reply

Your email address will not be published. Required fields are marked *