Linux tip for DevOpsđź’ˇ: how to learn about any command fast without leaving the Linux command line.

Andrey Byhalenko
DevOps Manuals and Technical Notes
3 min readJan 17, 2024

In this article, I will show you three quick ways to learn about any Linux command.

Photo by Gabriel Heinzer on Unsplash

Let’s say you want to know what the cp command does in Ubuntu 22.04.

You have at least three options to discover that without leaving the Linux command line: help, info, and man.

  • help

The built-in help command in the bash shell only lists some of the shell’s built-in commands and keywords. It's an internal documentation system for that shell.

As you can see here, bash shell cannot find any help topics related to the cp command. That’s because the help command is used with shell-built-in commands in bash. Built-in commands are those that are integrated directly into the shell itself, rather than being external programs.

cp is not part of bash; it’s a separate executable, /usr/bin/cp in Ubuntu 22.04.

This is why I prefer to use the following option if I want to use help:

cp --help

In Ubuntu 22.04 ,— —help supports both build-in and external commands.

  • info
info cp

The info command displays documentation in Info format.

The “Info” program is a stand-alone program, part of the
Texinfo distribution, which is used to view Info files on a text
terminal.
Texinfo is also used to generate HTML and printable (PDF/PS) versions.

  • man
man cp

man is the system’s manual pager. Each page argument given to man is normally the name of a program, utility, or function.
That’s the traditional Unix documentation system.

It’s a matter of taste which command to use (I prefer man).
In this article, I wanted to show that you don’t have to use Google to learn Linux commands.
You don’t have to leave the command line at all for that.

If you liked my articles, join my newsletter, and you will receive weekly DevOps tutorials, articles, and tips every Saturday.

As a bonus, you will receive a free step-by-step DevOps CI/CD project, which you can use in your portfolio.

Subscribe here: https://junior-devops-hub.ck.page

--

--

Andrey Byhalenko
DevOps Manuals and Technical Notes

I'm a DevOps Engineer, Photography Enthusiast, and Traveler. I write articles aimed at junior DevOps engineers and those aspiring to become DevOps engineers.