Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
there is no line like that. or even close that i can see. all lines have ## in front of them like comments. how many lines should I see of actual commands?
I opened it the way you suggested EDITOR= gedit the the rest.under file there is just some stuff about profiles but nothing about saving. what I do wrong?
I'm not sure what you are doing wrong. The editor you are describing doesn't sound anything like gedit. Lets try walking you through what you need to do in vi.
Log in and su to root as you did before. Then run:
Code:
EDITOR=vi
/usr/bin/visudo
After you get into vi you should see the contents of your sudoers file. Type the following exactly:
Code:
/^root
That "should" bring you to the root entry (I know you said you didn't have one, but this will make sure).
If your cursor is now on the root entry line type the following (replace YOURUSERNAME with your user name):
Code:
yypcwYOURUSERNAME[Esc]:wq[Enter]
If your cursor is NOT on the root entry line type the following (yes, replace YOURUSERNAME with your user name):
ok. I have found the "root" line (didn't realize you have to use the down arrows to move through the file). But even in this editor I get the same options when I choose "file". save not being one of them.how do I save the changes?
I also get a warning when I open the file to edit that the last sesion crashed and there may be someone else working on it or there maybe a duplicate file. probably from my abrubt exiting without saving. posibly unrelated I noticed a failure when I boot fedora" mounting fuse control file system failed" . don't know how important that is yet. first would like to straighten out monitor before I have a seizure.
The ":wq[Enter]" in the above should write and quit the file.
The above explaned:
"/^root[Enter]" (I know I forgot the "[Enter]" in the above, but I take it you figured that out) searches the file for the word root appearing at the beginning (signified by the "^") of a line.
"yy" yanks one line into the buffer.
"p" puts the item in the buffer below the current line.
"cw" changes the line from the current cursor position to the end of the current word.
"YOURUSERNAME" is what it changes it to and "[Esc]" ends the change input.
":wq[Enter]" writes the file out and quits (I use wq out of habit, you can also do the same thing with ":x")
forrestt, just wanted to let you know it worked and solved the monitor problem. I really appriciate your help. still have two failures on start up , but I'll sort that out in time. I have much to learn. Thanks!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.