Change Hostname in Ubuntu
来源:互联网 发布:网络空间作战部队 编辑:程序博客网 时间:2024/06/15 21:29
sudo vim /etc/hosts
Change the old hostname to the new one. For example, my /etc/hosts file said
192.168.168.100 oldhostname
So I changed it to
192.168.168.100 newhostname
I also edited the /etc/hostname
file.
sudo vim /etc/hostname
It read
oldhostname
So I changed it to
newhostname
After doing the following, the new hostname stuck as required.
sudo /etc/init.d/hostname.sh stop
sudo /etc/init.d/hostname.sh start
And then logout of your shell and log back in.
sudo /etc/init.d/networking restart
You should really read hostname error not resolving for more details.
As for my original problem of not being able to browse the network, it was solved with this fix.
- Change Hostname in Ubuntu
- Change Ubuntu hostname
- How to Change Hostname (Computer Name) in Ubuntu 14.04
- change hostname
- change hostname
- Redhat的安装CD变成yum源和How to Change hostname in RHEL 6.3
- Change root's password in Ubuntu
- Changing the hostname or computer name in ubuntu
- modified hostname in redhat
- Change your Mac Hostname via Terminal
- How to Change The Bootsplash In Ubuntu 8.10
- How to change the root password in Ubuntu
- How to change the system date in ubuntu
- How to change mysql default data directory in Ubuntu
- change backgroud color of the windows in ubuntu
- ubuntu修改hostname
- Ubuntu中修改hostname
- linux ubuntu hostname
- Android - 编译相关
- ARM C/C++编译器
- 图片搜索流程
- Android平台代号、版本和API级别
- C#无法嵌入互操作类型XXX.XXX请查看是否缺少引用集解决方法
- Change Hostname in Ubuntu
- 方便Git提交代码的几个工具
- 每位设计师都应该拥有的50个CSS代码片段-3
- Context Switch
- 命令模式
- OpenRisc-28-ORPSoC的clock子系统分析
- 关于redhat优化
- Notification可行性分析
- [Android] ListView中getView的原理+如何在ListView中放置多个item