LinuxQuestions.org
Help answer threads with 0 replies.
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 03-25-2005, 06:56 PM   #1
jimbrechin
Member
 
Registered: Oct 2004
Location: Montrose, Scotland
Distribution: PCLOS
Posts: 30

Rep: Reputation: 0
Exclamation How to edit a file


This must be the most basic question ever asked on these forums. I am a real newbie at linux as this will show.
I am running PCLOS and am trying to come to grips with some problems. One involves editing a config file. I open a terminal and su to root, edit the line involved but cannot save the ammendment. I am told that I don't have permission.
Where am I going wrong, Ithought that I could edit files and save them as root.
Thanks in advance, my head is hung in shame
 
Old 03-25-2005, 06:59 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
The file might be write protected, in which case you need to force the save . In vi and vim this is done by adding a ! after the save command. i.e.:

:w!q

Which editor are you using?
 
Old 03-25-2005, 07:04 PM   #3
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
or you could do some reading about permissions:

http://www.redhat.com/docs/manuals/l...ownership.html
 
Old 03-25-2005, 07:10 PM   #4
jimbrechin
Member
 
Registered: Oct 2004
Location: Montrose, Scotland
Distribution: PCLOS
Posts: 30

Original Poster
Rep: Reputation: 0
Thankyou for the replies.
The editor that I used was Konsol.
I will try vim and will look at the site posted to find out about permissions.
Thanks for your time, I will let you know how i get on.
jb
 
Old 03-25-2005, 07:42 PM   #5
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
if you're a total newbie - as a bit of advice, start out with a different editor - vi/vim is great but not intuitive. try something graphical, you probably have more than one installed by default on mandrake, like kedit, gedit, kwrite, etc, etc.

 
Old 03-25-2005, 07:52 PM   #6
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Why the assumption that if you're a newbie you can't learn an editor quickly? So vi isn't intuitive...so what? If it's unintuitive then logically it's going to be as difficult to learn the commands regardless of how long you've been using linux.

Learn much, learn often, learn early
 
Old 03-26-2005, 01:25 AM   #7
jimbrechin
Member
 
Registered: Oct 2004
Location: Montrose, Scotland
Distribution: PCLOS
Posts: 30

Original Poster
Rep: Reputation: 0
Thanks for the advice people.
My problem in editing and saving was that I needed to log in as root.
It appears that using SU in user mode is not sufficient or does not give me the required permissions.
Thank you all for your patience
 
  


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
Trying to edit a file AndreL Linux - Newbie 2 03-24-2004 06:45 AM
edit a file - how? michaeltweak Linux - Software 6 02-01-2004 11:25 AM
edit a file mjewell Linux - Newbie 3 01-19-2004 05:53 PM
how do i edit a file andym Linux - Software 6 04-16-2003 12:09 PM
how do I edit a file? JunLitsu Linux - General 7 04-10-2002 01:21 PM

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

All times are GMT -5. The time now is 01:20 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration