Ubuntu:Resolve Sudo Name Resolution: Difference between revisions
Appearance
Created page with "*Check in your hostname by running the command "hostname" on your terminal. The result will be blank as there is no hostname assigned. *Edit the <code>/etc/hostname</code> fil..." |
No edit summary |
||
| Line 1: | Line 1: | ||
* | *Periksa nama host Anda dengan menjalankan perintah <code>hostname</code> di terminal Anda. Hasilnya akan kosong karena tidak ada nama host yang ditetapkan. | ||
*Edit | *Edit <code>/etc/hostname</code> file <code>hostname</code> pada system. Berikan nama host pilihan Anda. Sebagai contoh, saya telah menetapkan nama host misal <code>inspiron-3558</code>. | ||
nano /etc/hostname | nano /etc/hostname | ||
<blockquote>'''Note:''' You will need root permission to edit the file</blockquote> | <blockquote>'''Note:''' You will need root permission to edit the file</blockquote> | ||
* | *Setelah itu simpan file dengan kombinasu <code>Ctrl + O</code> → <code>Enter</code> → <code>Ctrl + X</code> | ||
*Check the <code>/etc/hosts</code> file and edit the hostname same as in <code>/etc/hostname</code>. The <code>hosts</code> file maps the hostname to IP addresses. Hence, it is very important that you edit the hostname in the file. Please edit the hostname mapped with the IP address | *Check the <code>/etc/hosts</code> file and edit the hostname same as in <code>/etc/hostname</code>. The <code>hosts</code> file maps the hostname to IP addresses. Hence, it is very important that you edit the hostname in the file. Please edit the hostname mapped with the IP address | ||
127.0.1.1 | 127.0.1.1 | ||
Revision as of 21:44, 5 November 2021
- Periksa nama host Anda dengan menjalankan perintah
hostnamedi terminal Anda. Hasilnya akan kosong karena tidak ada nama host yang ditetapkan. - Edit
/etc/hostnamefilehostnamepada system. Berikan nama host pilihan Anda. Sebagai contoh, saya telah menetapkan nama host misalinspiron-3558.
nano /etc/hostname
Note: You will need root permission to edit the file
- Setelah itu simpan file dengan kombinasu
Ctrl + O→Enter→Ctrl + X - Check the
/etc/hostsfile and edit the hostname same as in/etc/hostname. Thehostsfile maps the hostname to IP addresses. Hence, it is very important that you edit the hostname in the file. Please edit the hostname mapped with the IP address
127.0.1.1
- Any changes made in the files do not take effect until the system is rebooted. So, please reboot the system for the changes to take effect.
- After rebooting check the
sudocommand to ensure it is working properly.