Unable to edit hosts file

Asked by Charanpal Singh Sekhon

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??

Cheers,
CP

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

gksudo gedit /etc/hosts

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

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

Regards
 NikTh

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.