kommandoen --help og man command er de viktigste verktøyene i kommandolinjen.
Virtually all commands understand the -h (or --help) option which will produce a short usage description of the command and it's options, then exit back to the command prompt. Type
man -h
or
man --help
to see this in action.
Every command and nearly every application in Linux will have a man (manual) file, so finding them is as simple as typing man command to bring up a longer manual entry for the specified command. For example,
man mv
will bring up the mv (move) manual.
Gå opp og ned i man-fila med piltastene, og avslutt å gå tilbake til kommandolinjen med tastaturknapp q.
man man
vil gi deg manualen for man man-kommandoen, som er en bra plass å begynne.
man intro
is especially useful - it displays the "Introduction to user commands" which is a well-written, fairly brief introduction to the Linux command line.
There are also info pages, which are generally more in-depth than man pages. Try
info info
for the introduction to info pages.
Hvis du er i tvil om hvilken kommando eller hvilke program du vil bruke, kan du prøve å søke i man-filene.
man -k foo, will search the man files for foo. Try
man -k thunar
to see how this works.
![]() |
|
Dette er det samme som apropos kommandoen. |
man -f totem, searches only the titles of your system's man files. For example, try
man -f gnome
![]() |
|
Dette er det samme som whatis kommandoen. |