Everybody welcome going to part six of the Linux command line mini module.
So in this video we're going to a brief talk about man pages.
Now what our main page is their manual pages.
Now they are documentation around either command system calls libraries file formats system tools system
Damon's so pretty much anything you want to know about but about a system is going to have some sort
of man page about it now can be found not just on the system but you can Google that to their online
man pages.
Now in most cases you're gonna end up googling the command you want and then ending up on stack overflow
and that gives you your answer.
However personally I don't use man pages too often unless I'm working with something like system calls
which we have a whole video on.
But outside of that you're generally going to use the Internet to Google this but I want you to understand
what man pages are and where their usefulness does come into play and knowing how to use them.
So we'll do a quick look.
So the way this works is you would use the command man and then whatever you want to search for.
So we'll look for lessons we've been using that recently.
Now we can see here we have a few things like list directory etc. so we can hit the spacebar to go down
shows us a lot more information than when we normally available from the program itself.
And sometimes it's an exact copy.
So q to quit perfect.
Now that's just standard command.
So man grep as an example.
Now we've got all of the grep stuff which is a long long list of options you can do.
So that's nuts man pages.
However what I want to do is quickly go over the system call pages now on Ubuntu in our particular case
with the ISO we downloaded.
Man pages for system calls are not available.
So you're going have to run this command right here.
Now this is going to install the libraries and the man pages on the system.
Now I've added the command inside the documentation below the video.
So go ahead and run that it would prompt you for your password you put in the password to use during
the the install and then that's pretty much it it will just install it.
Now to access man pages it's under Section 2.
So there are eight sections of the first section was user commands which is by default man.
And then for example now we're accessing no one.
Now if we wanted to access other ones such as system calls.
So we wanted to access the right system so we would use the number two.
And then we'd do whatever we wanted.
So Man 2 Right.
So now we can see here this is the system call we can see the header file it includes and the fight
it requires a file descriptor requires the buffer and then the size of the data being passed.
So in assembly or in C you would pass in this information now three is Seif the C5 C library functions
for as devices five as file format six as games seven as miscellaneous and again eight is administrative
sys admin stuff.
Now I've added all of those and their numbers to the bottom of the video go and play around with man
pages just kind of get used to it.
They are they are useful mainly around for me for the system calls but I'm sure you guys will find different
uses that you might not have seen before.