Posted: . At: 11:55 PM. This was 7 years ago. Post ID: 4022
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Useful Linux commands for new users, get information about packages.

A Linux installation contains many useful manual pages that provide much useful information to help you find your way around your Linux file system. The man hier command will load the hier(7) manual page that contains a full listing of all directories on your Linux system and what their role is in the file-system hierarchy. The man intro command is perfect for a new Linux user wanting to learn the command line. It will give you a simple primer on the bash shell and useful commands that a Linux user will be using in regular Linux sessions.

The apropos command is used to search the manual pages on the system for a certain keyword. In this case, we are searching for tutorials.

localhost% apropos tutorial 
gitcore-tutorial (7) - A Git core tutorial for developers
gittutorial (7)      - A tutorial introduction to Git
gittutorial-2 (7)    - A tutorial introduction to Git: part two
lwptut (3pm)         - - An LWP Tutorial
mdoc.samples (7)     - tutorial sampler for writing BSD manuals with -mdoc
perldebtut (1)       - Perl debugging tutorial
perlootut (1)        - Object-Oriented Programming in Perl Tutorial
perlpacktut (1)      - tutorial on "pack" and "unpack"
perlreftut (1)       - Mark's very short tutorial about references
perlretut (1)        - Perl regular expressions tutorial
perlthrtut (1)       - Tutorial on threads in Perl
perlunitut (1)       - Perl Unicode Tutorial

If you are needing to find out what a command does quickly, then the whatis command will help you. The output shows you what manual page is associated with a certain command.

localhost% whatis ls
ls (1p)              - list directory contents
ls (1)               - list directory contents

I am not sure what use this is but Linux has a quote command that will insert a word in quotes.

[jason@localhost ~]$ quote Supercalifragilisticexpialidocious
'Supercalifragilisticexpialidocious'

To look up a Linux command with the online manual pages, use this command.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ links man.cx/sudo

This is how to print the manual page to the terminal easily.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ lynx -dump man.cx/sudo | head -n 90

This command will print most of the online manual page and not the content after the grep match. This could be a very useful command to read an online manual page from the Internet in the terminal.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ lynx -dump man.cx/sudo | grep -A 200 -B 0 -m 1 "[INS: :INS]"

Or like this. Piping the output into less.

┌──[jason@192.168.1.2][~]
└──╼  ╼ $ lynx -dump man.cx/sudo | grep -A 200 -B 0 -m 1 "[INS: :INS]" | less

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.