Unable to edit hosts file

Asked by Charanpal Singh Sekhon on 2013-05-17

Hello, I am new to Ubuntu. i am trying to edit the hosts file in /etc directory. I have switched to root user as well. But I am unable to type in anything. It doesn't let me type anything in it. I am trying to add a hostname and ip address for the Ubuntu desktop installed on my Virtual Machine. It seems my keyboard stops responding within terminal. Any help??


Question information

English Edit question
Ubuntu gnome-terminal Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

gksudo gedit /etc/hosts

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :

We don't know what version of Ubuntu you use. If you use an Official derivative (such as Xubuntu or Lubuntu) then gedit is not exist.

So a most "correct" command would be

    gksudo xdg-open /etc/hosts


Can you help with this problem?

Provide an answer of your own, or ask Charanpal Singh Sekhon for more information if necessary.

To post a message you must log in.