LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Syntax problem (https://www.linuxquestions.org/questions/linux-newbie-8/syntax-problem-128139/)

thort 12-22-2003 02:16 PM

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]#

trickykid 12-22-2003 02:19 PM

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.

david_ross 12-22-2003 02:21 PM

Just in case you forget:
alias edit='vi'

thort 12-22-2003 02:27 PM

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?

trickykid 12-22-2003 02:31 PM

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.

thort 12-22-2003 02:37 PM

That's the problem. What shall I write on the command line?

I tried "edit /etc/fstab" but it doesn't work.

david_ross 12-22-2003 02:39 PM

alias edit='vi'
edit /etc/fstab

or:
vi /etc/fstab

trickykid 12-22-2003 02:41 PM

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.

thort 12-22-2003 02:44 PM

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. :)

thort 12-22-2003 03:08 PM

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.

:) :) :)


All times are GMT -5. The time now is 03:02 AM.