Red Hat System Administration I
Practice finding relevant information by using man options and arguments.
Outcomes
Use the
manLinux manual system and find useful information by searching and browsing.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start help-manual
Instructions
On
workstation, view thegeditman page. View the options for editing a specific file by usinggeditfrom the command line.Use one of the options from the
geditman page to open the/home/student/manualfile by usinggeditwith the cursor at the end of the file.View the
geditman page.[student@workstation ~]$
man geditGEDIT(1) General Commands Manual GEDIT(1) NAME gedit - text editor for the GNOME Desktop SYNOPSIS gedit [OPTION...] [FILE...] [+LINE[:COLUMN]] gedit [OPTION...] - ...output omitted...In the
geditman page, learn the options for editing a specific file from the command line.OPTIONS ...output omitted...
FILESpecifies the file to open when gedit starts. ...output omitted... `LINE` For the first file, go to the line specified by LINE (do not insert a space between the "" sign and the number). If LINE is missing, go to the last line. ...output omitted...Press q to quit the man page.
Use the
gedit ` command to open the `manual` file. The missing line number next to the `option opens a file that is passed as an argument with the cursor at the end of the last line.[student@workstation ~]$
gedit + manualthis is the first line the quick brown fox just came over to greet the lazy poodle!Confirm that the file is opened with the cursor at the end of the last line in the file. Press Ctrl+q to close the application.
Read the
su(1) man page.If you omit the user argument, then the
sucommand assumes that the user isroot. If thesucommand is followed by a single dash (-), then it starts a child login shell. Without the dash, thesucommand creates a non-login child shell that matches the user's current environment.[student@workstation ~]$
man 1 suSU(1) User Commands SU(1) NAME su - run a command with substitute user and group ID SYNOPSIS su [options] [-] [user [argument...]] DESCRIPTION su allows to run commands with a substitute user and group ID. When called with no user specified, su defaults to running an interactive shell as root. ...output omitted... OPTIONS ...output omitted...-, -l, --loginStart the shell as a login shell with an environment similar to a real login. ...output omitted...Note
Comma-separated options on a single line, such as
-,-l, and--login, all result in the same behavior.Press q to quit the man page.
The
mancommand also has its own manual pages. Open theman(1) command manual page.[student@workstation ~]$
man manMAN(1) Manual pager utils MAN(1) NAME man - an interface to the on-line reference manuals ...output omitted... DESCRIPTION man is the system's manual pager. Each page argument given to man is normally the name of a program, utility or function. The manual page associated with each of these arguments is then found and displayed. A section, if provided, will direct man to look only in that section of the manual. ...output omitted...Press q to quit the man page.
The
/usr/share/mandirectory contains all man pages. Locate the binary, source, and manual pages for thepasswdutility by using thewhereiscommand. Verify that the/usr/share/mandirectory contains the man pages for thepasswdutility.[student@workstation ~]$
whereis passwdpasswd: /usr/bin/passwd /etc/passwd/usr/share/man/man1/passwd.1ossl.gz /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gzUse the
man -k zipcommand to list the man page with detailed information about a ZIP archive.[student@workstation ~]$
man -k zip...output omitted...zipinfo (1) - list detailed information about a ZIP archivezipnote (1) - write the comments in zipfile to stdout, edit comments and rename files in zipfile zipsplit (1) - split a zipfile into smaller zipfilesUse the
man -k bootcommand to list the man page with a list of parameters that can be passed to the kernel at boot time.[student@workstation ~]$
man -k bootbinfmt.d (5) - Configure additional binary formats for executables at bootbootparam (7)- introduction to boot time parameters of the Linux kernelbootup (7) - System bootup process ...output omitted...Use the
man -k ext4command to find the command to tune ext4 file-system parameters.[student@workstation ~]$
man -k ext4...output omitted... resize2fs (8) - ext2/ext3/ext4 file system resizertune2fs (8) - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems