change host name and hit the wall :(
Like a fool, I tried to do what was sad on a page and the unclear instructions have me beating my head. on my desk.
What I did.
Type the following command to edit /etc/hostname using nano or vi text editor:
sudo vi /etc/hostname
Delete the old name and setup new name.
that is as far as I got because after that is read and save. I do not know how to save there is not save on the menu at the bottom. How to save I have no clue,
now I'm stuck. when I go back, I get this.
E325: ATTENTION
Found a swap file by the name "/etc/.
owned by: root dated: Fri Jul 5 22:18:59 2019
file name: /etc/hostname
modified: YES
user name: root host name: rjsmith-desktop
process ID: 4288
[not usable on this computer]
While opening file "/etc/hostname"
dated: Sun Aug 7 03:56:21 2016
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/hostname"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/.
to avoid this message.
"/etc/hostname" 1 line, 16 characters
Press ENTER or type command to continue
How I got here. I had to clone my hard-drive from one computer to use in computer 2. and to get them to work together I can't have the same hostname. So I was going to change it. That is all I need. 6 hours later and Im even more lost and wondering.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Bob for more information if necessary.