Modify the Hosts file under Ubuntu

Source: Internet
Author: User

The hosts of the Ubuntu system only need to modify the/etc/hosts file and restart the network after the modification.
The process is as follows:
1. Modify the Hosts
sudo gedit/etc/hosts
2. Add parse record (. ) or the Hosts file downloaded from GitHub

Terminal error when saving:

(gedit:2771): gtk-warning * *: Calling Inhibit failed:GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:The name Org.gnome.SessionManager was wasn't provided by any. Service files

The search has the following workaround:

Gksudo gedit/etc/hosts

If you do not have Gksudo installed, run the following command first:

sudo apt-get install Gksu

After installation, the Hosts file can be modified and saved normally.



3. Restart the network after saving
sudo/etc/init.d/networking restart

Modify the Hosts file under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.