- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Getting Help at the Command Line
Linux systems have an average of 3,000 commands on them, so it's not feasible to know more than a couple of hundred of the commands well. In this lab, we'll discover how to find out more information about commands and files on the system.
Lab Info
Table of Contents
-
Challenge
Use Built-In Help and External Help Commands to Find Out More About a Given Command
Get help for a command
ls --helpOutput the help to a file so it can be searched
ls --help > lshelp.txtScroll through the file:
less lshelp.txtQuit out of it by hitting q.
Find out what will run with
ls:which lsSee if there are more on the system:
which -a lsFind out more information about a command:
whereis lsFind out what a command is:
whatis crontab -
Challenge
Use the `man` Command and Related Utilities to Find Out More Information on Desired Commands
man -f crontabThis will show us the sections.
man manThere will be a table that shows us the section numbers. Quit out of it by hitting q.
man -f crontab man 5 crontabThis takes us to the configuration file format of crontab. Quit out of it by hitting q.
If we don't know which one we want, enter:
man -a crontabIt will show us the first one. Quit by hitting q. if we want the next one. Hit Enter.
-
Challenge
Investigate Additional Sources of Documentation on the System `tree`
cd /usr/share/doc/packagesRun the following:
tree -H '/usr/share/doc/packages' -L 1 --noreport --charset utf-8 > ~/packages_index.htmlNote: If
treeis not installed, you can install it by runningsudo -i zypper in tree.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.