LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-20-2008, 01:13 PM   #1
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Rep: Reputation: 16
Question No editor, no dns gateway, stucked, help please


Hello;

There no nano and pico installed.

There's no dns ip entered. I can't connect to domains. Only connect them from their ip's. (I could connect, but i rebooted the computer and after i started to can't connect domains.)

I'm trying to edit the "/etc/resolv.conf" file for dns, but it's really hard to edit it with "vi" editor. I can't find how to save it with "vi" :S

Nano gives error when typed "make" after "./configure"
Code:
...
...
/bin/sh: makeinfo: command not found
make[3]: *** [nano.html] Error 127
make[3]: Leaving directory `/root/nano-2.0.7/doc/texinfo'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/nano-2.0.7/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/nano-2.0.7'
make: *** [all] Error 2
Pine (i think it'll install pico with itself), says type "./configure" to start installing. But there's no configure file for run.

What i can do now :S Please show me a way.
 
Old 02-20-2008, 01:23 PM   #2
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
I'd strongly suggest you use vi. Here is a quick reference guide:

http://rcsg-gsir.imsb-dsgi.nrc-cnrc....c/node313.html

To save and quit, all you have to do is ':wq' (omit the ticks). There are 2 modes in vi, one for editing (that you can access hitting the letter i) and a command mode (that you can access hitting semi-colon ().

If you can't manage, what distro are you using ? Perhaps you can install the pico or nano package instead of compiling...
 
Old 02-20-2008, 01:24 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Try the vi cheat sheet.
 
Old 02-20-2008, 01:27 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
To navigate in vi type:

j = down
k = up
h = left
l = right

to change from cursor location to end of file

"c$" when done making changes "Esc"

When done editing the file

":wq"
(write and quit)

or

":w!
:q"
(force write)
(quit)

If you decide you don't want to change the file:

"q!"

(force quit)

NOTE: Don't include the quotes in any of the above.

Check out:

http://www.adminschoice.com/docs/vi_editor_ref.htm

You REALLY want to learn vi. It is on all systems by default and once you learn it, things are much easier than any other editor you may use (except for possibly emacs, but that is an operating system in my opinion (and no, I have never learned to use emacs)).

HTH

Forrest
 
Old 02-20-2008, 01:27 PM   #5
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
omg, it worked and i saved it Thanks friends.

And also how can i add more dnses? I want to add opendns ips', it has two ips.
And only one line in resolv.conf
"nameserver 208.67.222.222"

But i still want to use pico or nano. I'm using centos 4.

And what can i do for makeinfo error?
 
Old 02-20-2008, 01:29 PM   #6
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
vi has three main modes, when you want to add text press i look at the bottom of the screen and it should say INSERT make the changes that you need then press Esc to exit instert mode, to save and quit press Ctrl and the collon at the same time. This will allow you to enter commands, type wq then enter to write/save and quit. Make sure you are root user if the file you need to edit needs root permissions.

Last edited by mrrangerman; 02-20-2008 at 01:30 PM.
 
Old 02-20-2008, 01:32 PM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Navigate to the nameserver entry with "j"
Type "yy" to yank a line into memory.
Type "p" to put a line from memory.
Hit "j" to go to the line you just put.
Hit "l" (Leter after "k" NOT number before "2") until you go to the first digit in the IP address.
Type "c$" to change the line from that point on.
Type the new IP.
Hit "Esc" key.
Save the file as you did before and exit vi.

HTH

Forrest

Last edited by forrestt; 02-20-2008 at 01:34 PM.
 
Old 02-20-2008, 06:10 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,174

Rep: Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682
Actually,
:wq
is cargo-cult stuff, it's doing a write, then a quit. just use
:x
means exit-with-save
:q
means quit (ie exit-without-save)
:w <filename>
is used when you want to save the current buffer to another filename (don't actually type the angle brackets)

Last edited by chrism01; 02-20-2008 at 06:29 PM.
 
Old 02-20-2008, 06:19 PM   #9
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
chrism01, what can I say, I'm old.
 
Old 02-20-2008, 06:26 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
If you want to use nano, then simply install it. You do need to learn the basics of using vi to be able to safely edit the sudoers file and the passwd file.
visudo is used to edit /etc/sudoers and uses "vim" but adds error checking. The program to edit /etc/passwd safely also uses "vim".

Also, the rescue mode or a rescue disk will have "vim" or "vim-minimal" installed but might not have nano.

There is a "sed" program that you probably will want to learn to use. It is based on the "ed" program which "vim" is based on as well. So if you learn to search and replace in "vim", you will also learn how to do it in "sed" as well.

FYI, you can also use cursor keys in vi. You don't have to use the j,k,l,m keys to navigate. Navigation keys are mostly useful combined with other commands such as :del or :yank. You don't need to learn them if you don't want to. Also the [insert] key will toggle between insert and replace modes as you would expect. You can also press the [Insert] key to quickly get into the edit mode when you start.

Last edited by jschiwal; 02-20-2008 at 06:30 PM.
 
Old 02-20-2008, 06:30 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,174

Rep: Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682Reputation: 2682
Personally I'm nearly always on X-windows, so I cheat and use the mouse and /or ctrl-c/ctrl-v to copy and paste, but on a console you need the old yank/put combo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Blocked by gateway! Samhein Linux - Networking 4 11-28-2005 04:46 AM
How to see DNS ,GATEWAY etc.. tkmuthuvel Linux - Networking 1 09-12-2005 02:53 PM
DNS and gateway ThorRune Linux - Hardware 3 08-26-2005 02:19 PM
Changing IP, DNS, Gateway, etc... Psykoral Mandriva 2 11-18-2003 10:32 AM
Gateway and DNS jayakrishnan Linux - Networking 5 07-05-2003 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration