White Hat Institute

Linux basics

Command-line interface (part 3)

Identifying commands

A command can be one of four distinct things:

1. An executable program like every one of those documents we saw. Inside this class, projects can be assembled binaries, for example, programs are written in C and C++, or projects sent in scripting dialects, the shell, Perl, python, ruby, and so forth.

2. A command incorporated with the shell itself. Bash supports various commands inside called shell built-ins. The  option, for instance, is a shell built-in.

3. A shell function. These are smaller than standard shell contents added to the environment.

4. An alias, the commands that we can define ourselves, built from other commands.

It is frequently valuable to know precisely which of the four sorts of commands was utilized, and Linux gives a few different ways to discover it.

  • : This option is a shell built-in that shows the type of the specific given command name.

Linux basics 19
  • : Bash has built-in assistance accessible for every one of the shell built-ins. To utilize it, type  trailed by the name of the shell built-in.

Linux basics 20

Numerous executable projects bolster a  option that shows a description of the command’s upheld syntax and choices.

Linux basics 21
  • manual page: Most executable programs planned for command-line use give a conventional bit of documentation called a manual page. Type  command, followed by the program name to view the manual page for that specific program.

Linux basics 22
  • information: The GNU Project gives a choice to man pages for their projects, called  Info pages are hyperlinked, much like website pages. The information program reads data documents, which are tree organized into individual nodes, each containing a single theme. Information records contain hyperlinks that can move you from node to node. A hyperlink can be recognized by its driving reference bullet and is initiated by setting the mouse cursor upon it and pressing the “key.

  • : Sometimes there is more than one form of an executable program introduced on a framework. While this isn’t extremely regular on workstations, it’s not surprising on large servers. Use the  operator to determine the exact location of a given executable.

Linux basics 23
  • : The shell enables you to make aliases. Aliases are frequently used to create a simpler to recollect name for a current command or to supply parameters effectively.

Linux basics 24

To remove the alias you created, use the  command, and specify the alias name.

Linux basics 25