You are on page 1of 11

MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.

4122/

Log in Register 
Forums What's new  Linux Tutorials  Members  Download Linux
New posts Search forums
Forums  Linux Tutorials  Linux Beginner Tutorials 

MAN Pages & Useful Information


 Rob ·  Jul 9, 2013

Jul 9, 2013  #1

How to get more information with Linux

Now we'll talk about some other commands that you will probably need in your
day to day work with Linux. They make your work a little easier and give you
Rob
Administrator
added information about your system.
Staff member
Joined: Oct 27, 2011
'man' - manual pages in Linux
Messages: 1,059
Reaction score: 2,002 The first command is 'man'. This command will show the manual for a
Credits: 2,358
command or program. The manual is a file that shows you how to use the
command and list the different options for the command in question. You
would type:

Code:

man [the command]

For example, if you type

Code:

man mkdir

The manual file for 'mkdir' will come up and give you a detailed explanation of
this command.

Managing Documentation in Linux

The manual file for 'mkdir' is actually one of the more straight-forward ones.
There are a lot that I think we're written by Harry Bigbrains and they were
meant to be seen only by Richard Biggerbrain who's sitting in the cubicle next

1 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

to him.

For example, this appears in the 'man' file for 'cp'

By default, sparse SOURCE files are detected by a crude heuristic and the
corresponding DEST file is made sparse as well. That is the behavior selected by
--sparse=auto. Specify --sparse=always to create a sparse DEST file whenever
the SOURCE file contains a long enough sequence of zero bytes. Use
--sparse=never to inhibit creation of sparse files.

I don't know about you, but I'm going to call my lawyer. I've been assaulted by
"a crude heuristic".
If you use the command cp --help, you'll get a nutshell version of the 'cp'
command.

If you use your pipe cp --help | less, it'll be a little easier to manage.

The 'info' format

Typing info [command name] will get you more information on a command and
is more current than most man files and perhaps a little more readable. In fact,
some 'man' files will actually tell you to consult the 'info' file. The 'info' files are
not always installed automatically. so you may want to consult your own version
of Linux about these files.

Apropos

The word 'apropos' means pertinent to something else. There is a command


that will show you all of the man page that may shed some light on a certain
command. For example, if I typed:

Code:

apropos xterm

resize (1x) - set TERMCAP and terminal settings to current xterm window size
xterm (1x) - terminal emulator for X
terms (5) - database of blessed terminals for xtermset.
xtermset (1) - change settings of an xterm

These are all man pages related to xterm. You would then just choose one of
these and type man terms for example.

Some versions of Linux that are made for languages other than English will give
you this documentation in its particular language. There are also websites that

2 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

specialize in documentation in other languages. You can use your favorite


Internet search engine to find Linux documentation in your own language.

Essential Linux Command Line (my ebook / $2.99!)


Linux Tutorials (my YouTube channel)
Razib007, MD Razibul Haque, indawild13rodriduez and 18 others

Sep 25, 2017  #2

Oh man, I had to comment, I'll be chuckling quietly for ages after reading that.
Better lawyer up, I hear Harry Big Brains is in town. Thank you for the chuckle

We trust you have received the usual lecture from the local System
TCRatius Administrator. It usually boils down to these three things:
Member
#1) Respect the privacy of others.
Joined: Aug 30, 2017
#2) Think before you type.
Messages: 26
#3) With great power comes great responsibility.
Reaction score: 30
Credits: 0
Gannburg, r3yadh, Nik-Ken-Bah and 5 others

Oct 3, 2017  #3

A Really nice tutorial. Thanks for sharing.

Atif Satti
New Member
Joined: Oct 3, 2017
Messages: 1
Reaction score: 3
r3yadh, Cheng++ and wizardfromoz
Credits: 0

Jan 5, 2018  #4

Thanks for this. it is really helpful and I would be happy if you help me with any
idea of understanding man pages.

Gokul
New Member
Joined: Jan 5, 2018
Messages: 16
Reaction score: 10
r3yadh, Vrai and wizardfromoz
Credits: 0

3 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

Jan 6, 2018  #5

@Gokul ... welcome to linux.org , hope you enjoy your time with us

Have a click at the top of your site Menu, where it says Forums, and you will see
a number of choices, for example General Linux, Getting Started, and perhaps in
wizardfromoz
Administrator this case, Command Line. It is at https://www.linux.org/forums/command-
Staff member line.145/ if you want to shortcut.
Gold Supporter
Joined: Apr 30, 2017
There you can start a thread (topic) and just name it so it is clear, for example
Messages: 8,410 "Help with understanding Manuals", or whatever.
Reaction score: 7,335
Credits: 33,623
I think you will be pleasantly surprised to see the help you get from Members
here

... and I agree with the other members above, it is a good Tute (kudos @Rob ),
who runs this site.

"apropos" is pronounced "app-pro-poe", and I wonder if the (well-meaning, I


am sure) Linux person whom started using it was being pedantic - but then
using "pedantic" is possibly being pedantic? Go figure.

Enjoy your Linux.

Chris Turner
wizardfromoz

THOUGHTS FOR FEBRUARY 2023 1. Ask me in March. 2. ON AV - nothing is bulletproof, but i


wear kevlar - i use linux . 3. Still Beer o'clock where I live . 4. Come and have a sing-along at
Rock Roxx . 5. Why so many Distros, Wiz? 6. Brighten Up Your Grub

r3yadh, Rahul Mhaske, Vrai and 3 others

4 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

Jan 6, 2018  #6

Thanks for your information

Gokul
New Member
Joined: Jan 5, 2018
Messages: 16
Reaction score: 10
wizardfromoz
Credits: 0

Jul 31, 2019  #7

A Thanks for sharing with us. It is very informative

AGee
New Member
Joined: Jul 26, 2019
Messages: 6
Reaction score: 2
Credits: 0

Sep 24, 2019  #8

Rob said: 

By default, sparse SOURCE files are detected by a crude heuristic and the corresponding
DEST file is made sparse as well. That is the behavior selected by --sparse=auto. Specify
mudz --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long
New Member enough sequence of zero bytes. Use --sparse=never to inhibit creation of sparse files.
Joined: Sep 23, 2019
Messages: 9 I don't know about you, but I'm going to call my lawyer. I've been assaulted by "a crude
Reaction score: 7 heuristic".
Credits: 0 If you use the command cp --help, you'll getexpand...
a nutshell version of the 'cp' command.
Click to

Mannn, please use english.. This is just like my head was positive pole and this
article part is positive pole too but when I read that, these two repel each other
!

- Mudz

5 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

Dec 11, 2019  #9

A I typed "man man" and I can hardly understand. Can someone tell me how to
read the man pages, especially at the synopsis part, thanks

abang
New Member
Joined: Dec 11, 2019
Messages: 1
Reaction score: 0
Credits: 0

Dec 11, 2019  #10

In the case of man man - the Synopsis section is a very confusing and unhelpful
list of different was to invoke the man command using different syntax/options.
Most of which will not make sense unless you look up the meanings of all of
the options listed.
JasKinasis
Well-Known Member
Joined: Apr 25, 2017 Most commands only list one or two different ways of calling the program in
Messages: 1,677 the Synopsis section of their man pages, but it seems that the man can be
Reaction score: 2,430 invoked in a lot of different ways.
Credits: 13,237

In the case of the man command - it's not a very easy section to understand -
I'd simply ignore it and take a look at the "Examples" section instead!

TR0767, wizardfromoz and abang

May 22, 2021  #11

W Thanks for this tutorial.


I'd like to add this simple explanation about how to access different sections of
the manual.

Walthair14
New Member
For a long time I wondered what meant the (number) next to a command name
Joined: May 22, 2021 in the SEE ALSO section of a manual page; for instance dconf(7). Well, this
Messages: 3 number refers to the manual section that contains the page. This is useful when
Reaction score: 10 there is different pages with the same name in different section of the manual.
Credits: 42

For instance:
man dconf will open the first page named dconf it founds, which is dconf(1).
man dconf.7 or man 7 dconf will open the page named dconf in the section 7 of
the manual, or dconf(7).

Maybe, a line could be added about it in the tuto. I know this is explained in the
manual's manual page, but as a beginner the diziness I felt after going through

6 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

the synopsis left me unable to understand the following sections (I am


unfortunately not related to Mr Bigbrains ).
wizardfromoz

Jul 7, 2021  #12

Almost all commands have also a help option to show a brief reminder of the
available options, like in

Code:
Fjor
cd --help
New Member
pwd --help
Joined: Jul 7, 2021
Messages: 2
Reaction score: 4
Credits: 29 For bash, there is also the 'help' command that shows a short summary of bash
internal commands, and also shows info of a particular command, as in:

Code:

help logout

The problem with the synopsis section of man pages is that they show the
possible 'formats' or 'general use cases' of the command they describe in a very
schematic manner. In my 'man man' page, the very first format says

Code:

man [man options] [[section] page...]

but we have to read a lot to grasp what that mean:

Code:

[ ] the square brackets indicate optional parts


man is the word 'man', the command, mandatory as it hasn't brackets
man options are the optional options, that can be 'dash letter' or 'dash dash
section the optional number of section: 1...9 (later explained in the man
page the optional page to search for

The following lines show special cases that require an option to distinguish
from the basic form.

If we omit the section number, man will show the first page found. Is possible
some sections are not in the system unless explicitly installed, like the section 3,
used for programming instructions.

So, to be useful, at least we have to put a word after man, like this: man ls

7 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

'man ls' will find the 'ls' command man page and show it within a pager, a
program that allow us to move in the page with the arrow keys page up/down
keys. To exit the viewer, press the q key. (This viewer is almost always the
command 'less'; pressing the h key will show its own help info).

In this aspect, man is like almost every command available: We write at least the
command name. If we need to indicate more information, we include some
options with dashes, and if the command must operate on some object(s) we add
some other words (called 'arguments') to indicate that.

We don't need to memorize all the options; very often one or two are enough
for the daily life.

For example, 'man ls' shows that 'ls' operates alone or with some options or
some files and the options can be combined. Examples:

Code:

ls shows the current directory contents alphabetically (it's the de


ls /etc shows the contents of the /etc directory
ls -t shows the current directory contents, but sorted by modification t
ls -l shows the listing in a long format with a lot of more data
ls -lt shows the listing in a long format sorted by time

How do we know which options are available and what they are useful for?
Sorry, we have to read the man page of the command to find out.

It's too complicated? It seems so at first glance, but the regularly used
commands are few, maybe not more than thirty or so, and very soon, using
them, they become easy as a pie. In another message I will list them. Good day!

Sorry for the long novel; I hope this can help clarify the terseness of the man
pages.
Last edited: Jul 7, 2021
honghu

Jul 31, 2021  #13

T For people who don't have the 'info' command, you need to install first using:
sudo apt install info

TechTycho
New Member
Joined: Jul 30, 2021
Messages: 3
Reaction score: 1
aravi
Credits: 18

8 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

Nov 26, 2022  #14

D Question!
When look in /usr/share/man/man1 all the pages is in .gz format. Is there any
easy
way to read them in, for example, falkon or firefox?
DanneA
New Member
Or is there a page-reader for them in my Debian system that is better then the
Joined: Nov 26, 2022 konsol
Messages: 1 window? I have looked around but do not find any answer for this...
Reaction score: 0
Credits: 7

Nov 26, 2022  #15

One answer for gzipped files:

Code:

[flip@flop ~] $ zcat README.gz | less


osprey
Well-Known Member
That's readable in the terminal.
Joined: Apr 15, 2022
Messages: 547
Reaction score: 462 But, for man pages, it's best to use:
Credits: 5,058
Code:

man <manpage>

since the compressed man pages are written in troff code so you'd be reading
between all the codes to get the man page text if you just used zcat on the .gz
file. For example the first 10 lines of the dwm man page source code in troff
look like:

Code:

.TH DWM 1 dwm\-VERSION


.SH NAME
dwm \- dynamic window manager
.SH SYNOPSIS
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
and floating layouts. Either layout can be applied dynamically, optimising the
environment for the application in use and the task performed.
.P

That's more difficult to read than:

9 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

Code:

[flip@flop ~] man dwm

DWM(1) General Commands Manual

NAME
dwm - dynamic window manager

SYNOPSIS
dwm [-v]

DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, mon
floating layouts. Either layout can be applied dynamically, optimising the
ment for the application in use and the task performed.

There are GUI apps to read manpages, but I'm not familiar with them any more.
Here's some information on using firefox: https://askubuntu.com/questions
/339255/how-do-i-make-man-pages-open-in-a-web-browser. Bear in mind
that viewing man pages in that way uses up more resources than a terminal.
Last edited: Nov 26, 2022

Feb 6, 2023  #16

A TechTycho said: 

For people who don't have the 'info' command, you need to install first using:
sudo apt install info
aravi
New Member Thanks. Couldn't find this command after searching the net and had to resort to
Joined: Feb 6, 2023 'Add Software' section in raspberrypi to get it installed. Should have searched
Messages: 1 here first.
Reaction score: 0
Credits: 6

You must log in or register to reply here.

Members online
kc1di, f33dm3bits

Linux Laptops Custom Built for You


MALIBAL is an innovative computer manufacturer that

10 sur 11 2023-03-29, 13:52


MAN Pages & Useful Information | Linux.org https://www.linux.org/threads/man-pages-useful-information.4122/

produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Total: 365 (members: 2, guests: 363)

Latest posts
Xubuntu System install printer libdvd-pkg:
`apt-get check` failed, you may have broken
packages. Aborting
Latest: Brickwizard · 54 minutes ago
ForumsGeneral
 LinuxLinux
Tutorials  Linux Beginner Tutorials 
Questions

A How to ping an ipv6 server from another


 Default Style Random Rob : Rob's random stuff HomeownerBBQ : Rob's BBQ stuff AI 4 Work : AI Community
server?
Latest: Anago23 · 59 minutes ago Contact us Terms and rules Privacy policy Help 
Linux Networking
Community platform by XenForo® © 2010-2022 XenForo Ltd.
S Parts Testing
Solved of this site the question
powered format
by XenForo add-ons from DragonByte™ ©2011-2023 DragonByte Technologies Ltd. (Details)
Latest: sphen · Today at 4:55 PM
General Linux Questions

S NOOB I want to run WinXP only in


VIRTUALBOX
Latest: sphen · Today at 4:45 PM
Getting Started

Retro Linux game disk - which distro?


Latest: MattWinter · Today at 4:12 PM
Linux Gaming

11 sur 11 2023-03-29, 13:52

You might also like