LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-22-2003, 03:16 PM   #1
thort
Member
 
Registered: Nov 2003
Location: Sweden
Distribution: Mint 11
Posts: 185

Rep: Reputation: 31
Syntax problem


Hi !

I want to edit fstab.

Can someone please help me see what's wrong whith the syntax.

[[thor@localhost thor]$ su
Password:
[root@localhost thor]# edit /etc/fstab
bash: edit: command not found
[root@localhost thor]#
 
Old 12-22-2003, 03:19 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
edit isn't a valid editor like what your probably use to in DOS.

Use vi, vim, pico, emacs or any other valid editor in Linux.
 
Old 12-22-2003, 03:21 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Just in case you forget:
alias edit='vi'
 
Old 12-22-2003, 03:27 PM   #4
thort
Member
 
Registered: Nov 2003
Location: Sweden
Distribution: Mint 11
Posts: 185

Original Poster
Rep: Reputation: 31
Thank you !

In Nautilus I can rightclick on "fstab" and choose an editor to open the file. But I can only open it as "read only". No edit is possible. How can I open the file and be able to edit it?
 
Old 12-22-2003, 03:31 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by thort
Thank you !

In Nautilus I can rightclick on "fstab" and choose an editor to open the file. But I can only open it as "read only". No edit is possible. How can I open the file and be able to edit it?
Open up a terminal and edit it from there.
 
Old 12-22-2003, 03:37 PM   #6
thort
Member
 
Registered: Nov 2003
Location: Sweden
Distribution: Mint 11
Posts: 185

Original Poster
Rep: Reputation: 31
That's the problem. What shall I write on the command line?

I tried "edit /etc/fstab" but it doesn't work.
 
Old 12-22-2003, 03:39 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
alias edit='vi'
edit /etc/fstab

or:
vi /etc/fstab
 
Old 12-22-2003, 03:41 PM   #8
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by thort
That's the problem. What shall I write on the command line?

I tried "edit /etc/fstab" but it doesn't work.
Umm.. like what was mentioned before..

vi /etc/fstab
vim /etc/fstab
pico /etc/fstab

Substitute your non-existent command of edit with vi, vim or pico or any other command that is a valid one or a valid editor in Linux.

Regards.
 
Old 12-22-2003, 03:44 PM   #9
thort
Member
 
Registered: Nov 2003
Location: Sweden
Distribution: Mint 11
Posts: 185

Original Poster
Rep: Reputation: 31
Thank you !

I will leave Windows XP for now and reboot my computer into Red Hat and try.

I will be back and tell you if it works.
 
Old 12-22-2003, 04:08 PM   #10
thort
Member
 
Registered: Nov 2003
Location: Sweden
Distribution: Mint 11
Posts: 185

Original Poster
Rep: Reputation: 31
Now I suceeded.

"gedit /etc/fstab" took me to the editor.

Now I have edited fstab so I have access to all my Windows partitions.

Thank you for helping me.

I was slow in understanding your advices due to my bad english.

 
  


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
LDAP Problem Invalid DN Syntax (34) steve007 Linux - Newbie 3 08-24-2009 08:53 AM
LDAP Problem Invalid DN syntax (34) steve007 Linux - Newbie 3 10-18-2005 06:03 AM
MySQL syntax problem Hydrap Linux - Software 1 08-11-2005 11:49 PM
C syntax problem with if statements illiniguy3043 Programming 3 12-06-2004 03:06 AM
syntax problem jackopa Linux - Software 0 05-08-2002 12:22 AM


All times are GMT -5. The time now is 06:52 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration