Jump to content

Ubuntu:Resolve Sudo Name Resolution: Difference between revisions

From Wiki
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.
*Periksa nama host Anda dengan menjalankan perintah <code>hostname</code> di terminal Anda. Hasilnya akan kosong karena tidak ada nama host yang ditetapkan.
*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>.
*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
 
<syntaxhighlight lang="shell">vim /etc/hostname</syntaxhighlight>


<blockquote>'''Note:''' You will need root permission to edit the file</blockquote>
<blockquote>'''Note:''' You will need root permission to edit the file</blockquote>
Line 7: Line 8:
*Setelah itu simpan file dengan kombinasi <code>Ctrl + O</code> → <code>Enter</code> → <code>Ctrl + X</code>
*Setelah itu simpan file dengan kombinasi <code>Ctrl + O</code> → <code>Enter</code> → <code>Ctrl + X</code>
*Cek file <code>/etc/hosts</code> dan edit hostname pada directory <code>/etc/hostname</code>. memetakan nama host ke alamat IP. Oleh karena itu, sangat penting bagi Anda untuk mengedit nama host dalam file. Harap edit nama host yang dipetakan dengan alamat IP  
*Cek file <code>/etc/hosts</code> dan edit hostname pada directory <code>/etc/hostname</code>. memetakan nama host ke alamat IP. Oleh karena itu, sangat penting bagi Anda untuk mengedit nama host dalam file. Harap edit nama host yang dipetakan dengan alamat IP  
127.0.1.1  
 
<syntaxhighlight lang="shell">127.0.1.1</syntaxhighlight>


*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.
*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.

Revision as of 07:22, 29 August 2022

  • Periksa nama host Anda dengan menjalankan perintah hostname di terminal Anda. Hasilnya akan kosong karena tidak ada nama host yang ditetapkan.
  • Edit /etc/hostname file hostname pada system. Berikan nama host pilihan Anda. Sebagai contoh, saya telah menetapkan nama host misal inspiron-3558.
vim /etc/hostname

Note: You will need root permission to edit the file

  • Setelah itu simpan file dengan kombinasi Ctrl + OEnterCtrl + X
  • Cek file /etc/hosts dan edit hostname pada directory /etc/hostname. memetakan nama host ke alamat IP. Oleh karena itu, sangat penting bagi Anda untuk mengedit nama host dalam file. Harap edit nama host yang dipetakan dengan alamat IP
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 sudo command to ensure it is working properly.

Terkait

Source