LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   opening files... (https://www.linuxquestions.org/questions/linux-newbie-8/opening-files-115424/)

hoffman 11-12-2003 08:53 PM

opening files...
 
I'm trying to edit the code in grub.conf.
I can get to it via the file manager in the boot file but I can't get it to open. (It has a red slash symbol on it).
I tried the command line and opening pico but it says "command line not found" I must not have
pico...
I can also get to it using emacs but damned if I can figure that out either.
I also tried logging in as su on the command line and typing "/boot/grub/grub.conf" and it says "permission denied".
I've been fooling with it for a few hours now and I'm sort of stumped.
just keep plugging I guess...
Ought to be real fun getting p2p working on this thing

:eek:

I'm not fooling with anything until I get this one ironed out.

Awatto 11-12-2003 08:59 PM

I'm not quite sure what you mean you logged in as su and typed "/boot/grub/grub.conf" cause as far as I know in a terminal that won't do anything

Open a terminal (console) and type:
su
<password>
vi /boot/grub/grub.conf

If that doesn't work something is messed :D

gradedcheese 11-12-2003 09:00 PM

what happens if you do:

su
[log in as root]
cd /boot/grub/
emacs grub.conf

?

EDIT: or yes do what Awatto said (same thing but using vi)

basically you
1) log in as root
2) go to while the file is located
3) tell emacs or vi to open that file

xode 11-12-2003 09:02 PM

First you need to see what's there and if it is a file or not. Are you familiar with what a bash terminal is?

gradedcheese 11-12-2003 09:04 PM

one more thing. You can edit grub dynamically when you turn on your computer and the grub screen loads after POST. Press "e" to edit your configuration. IT's a little confusing (follow the steps on screen) but convinient.

Awatto 11-12-2003 09:06 PM

Hmm, I didn't know that myself, nice to know :D

hoffman 11-12-2003 09:14 PM

I'm getting there. I logged in as su on the terminal, (that's the same as command line isn't it?) then opened nautilus and clicked right to it windoze style. (the red circle/slash is gone) I have it opened now.
Hmmmm, How do I edit the code? I can view it but I can't change it.

I wasn't logging in as su properly before because the prompt deal didn't say "root@alltel..."

Funny, I hold out on posting a question and as soon as I do It sort of comes to me...

"Bourne again shell." But I only have a fuzzy notion about how the different shells and term
inals work.

Awatto 11-12-2003 09:21 PM

Hmm, I don't do much windoze style anymore so couldn't tell you, not familiar with vi? If not it's about time you learnt :D

hoffman 11-12-2003 09:28 PM

[hoffman@alltel hoffman]$ su -
Password:
[root@alltel root]# vi/boot/grub/grub.conf
-bash: vi/boot/grub/grub.conf: No such file or directory
[root@alltel root]#

This is what I keep getting.
I guess I can't edit from nautilus, just look...

Halo_Rules 11-12-2003 11:15 PM

vi /boot/grub/grub.conf

Needs a space between vi and /boot/grub/grub.conf

Vi is a text editor and your telling it to edit that file.

gradedcheese 11-13-2003 12:24 PM

yes and don't use Nautilus as root. Instead run vi or emacs or the like as root. If you do want to use nautilus though, browse to the file like you did, right click on it, and choose gedit to open it OR, much better:

su
cd /boot/grub/
gedit grub.conf

That will just open it in gEdit (like Windows Notepad) with root permission. That's probably the way you'd want to do things if you don't like command line editors.


All times are GMT -5. The time now is 04:09 PM.