I had a issue with 2 questions and I was wondering whats the best way to use man . . .

Dennis Watson:
I had a issue with 2 questions and I was wondering whats the best way to use man and --help to find what im needing?

We are trying to run apropos ssh command to get some details about the commands related to ssh but we are getting this error:

ssh: nothing appropriate.

Look into the issue and fix the same to make apropos ssh command work.

and the 2nd problem:

Using apropos command, find out the the configuration file for NFS mounts and save its name in /home/bob/nfs file.

• NFS mounts configuration file name is saved in “/home/bob/nfs” file?

Aaron Lockhart:
Hi, @Dennis Watson! Could you tell me which lab(s) are you having this issue with, so I can check them?

Dennis Watson:
I wouldn’t say it was much of a issue. Just wanted some tips on finding the correct answer @Aaron Lockhart This is the very first lab in the course. Thanks!!

Aaron Lockhart:
@Dennis Watson, before you can use apropos you have to run sudo mandb. The manual pages are there, but apropos has to have its database created first.

Dennis Watson:
@Aaron Lockhart is this something I should know or is that something I can find on the command line via --help or man?

Also how would I go about finding the solution for the 2nd question?

Using apropos command, find out the the configuration file for NFS mounts and save its name in /home/bob/nfs file.

• NFS mounts configuration file name is saved in “/home/bob/nfs” file?

1 Like

Aaron Lockhart:
@Dennis Watson, the sudo mandb requirement is covered in the lecture for system documentation (which comes before that lab).

Regarding the question for NFS mounts, you can search for “NFS mounts” with apropos "NFS mounts". Provided you’ve done the sudo mandb to update the index, you should see the name of the .conf file you need.

Dennis Watson:
@Aaron Lockhart sorry to bother you again but I cant seem to figure out of to save the file and exit vi mode once in.

Aaron Lockhart:
@Dennis Watson: No problem. That’s covered in the pagers and vi demo lecture: https://kodekloud.com/topic/demo-pagers-and-vi/

To save and exit in vi, you need to make sure you’re in command mode by pressing ESC. Then type :wq followed by ENTER. That will write and quit.

Dennis Watson:
@Aaron Lockhart im keeping you busy today lol but im just trying to get this right. I just cant figure out how to save the file in /home/bob/nfs. When I vi /home/bob/nfs and try to save nfsmount.conf it gives me a write error.

Aaron Lockhart:
@Dennis Watson, had you previously edited that file as another user (perhaps as root by using sudo vi /home/bob/nfs)? There shouldn’t be a read-only or append-only status on the file.

Dennis Watson:
@Aaron Lockhart Ya the wall im running into which might be small is that I use vi/home/bob/nfs and I try to save nfsmount and type :w… it says E212: Can’t open file for writing

Aaron Lockhart:
@Dennis Watson: Use :q! to exit the file without saving. Then delete whatever file you have for /home/bob/nfs (if anything) and try using vi /home/bob/nfs again.

quest 1 n apropos ssh command to get some details about the commands related to ssh but we are getting this error:

ssh: nothing appropriate.
Ans:  sudo mandb
then run apropos ssh

question 2 
>touch  /home/bob/nfs
>nano   /home/bob/nfs
 add both file path 
/etc/nfsmount.conf 
/etc/fstab
save cntrl x & cntrl Y

@ankitachandel11: Before you can use the apropos command, you have to run sudo mandb. apropos needs a database to search, and sudo mandb creates that database.

For the second question you have, you should only have nfsmount.conf in your file. The question is looking for the name of the file, instead of the full path. apropos "NFS mounts" will show nfsmount.conf. You would not need to include anything about fstab.

Aaron Lockhart
KodeKloud Support

Sir, I worked on lab & both answers are correct that i mentioned.

@ankitachandel11: In question 8 of this lab, you are asked to SSH to a different server (dev-host01). At the end of that question, you should use exit to return to the original server. If you do not exit at the end of question 8, questions 9 and 10 will be counted as incorrect, even if you take the correct steps for the, because they will take place on an incorrect server.

Can you verify that you have run the exit command at the end of question 8 before moving on to questions 9 and 10 in that lab?

Thank you,

Aaron Lockhart
KodeKloud Support

Omg im so glad I typed this in I was stuck too on apropos “NSF mounts” the sudo Mandb fixed it right up! :pray:

Hi need help with this please. I’m on the first lab I make it to sudo mandb then it’s time to apropos “NSF mounts” which I get the correct out put from the command how ever when it’s time to create the required file vi /home/bob/nfs with file content looking like this: nsfmount.conf I’m lost on how to accomplish this @Aaron-Lockhart if you could please explain how to do this because I followed the instructions how ever I’m missing some thing I can not clear this to move in to next part. Thank you so much

Hi
Find guide below:
step 1: sudo mandb
step 2: vi /home/bob/nfs
step 3: press i on your keyboard(What this basically do is to help you edit “nfs”
step 4: type in nfsmount.conf (if your display isn’t large enough to see what you typing just scroll up with your mouse)
step 5: press Esc botton on your keyboard to exit insert mode
step 6: type in :wq (used to write and quite)

Hope this information is helpful, if still not clear please refer to Youtube video link below for explanation regarding Linux Basics: How to use vi text editor