Jump to content

Ubuntu:Resolve Sudo Name Resolution: Difference between revisions

From Wiki
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
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
*Check in your hostname by running the command "hostname" on your terminal. The result will be blank as there is no hostname assigned.
*Periksa nama host Anda dengan menjalankan perintah <code>hostname</code> di terminal Anda. Hasilnya akan kosong karena tidak ada nama host yang ditetapkan.
*Edit the <code>/etc/hostname</code> file in which the hostname is stored in your system. Provide any hostname of your choice. As an example, I have assigned the hostname as <code>inspiron-3558</code>. You can use the following command to edit the file.
*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
 
  vim /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>


*Once you have saved the file with your new hostname, run the command "hostname" to confirm. The new hostname should be displayed on the screen.
*Setelah itu simpan file dengan kombinasi <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
*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  
 
  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.
*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 <code>sudo</code> command to ensure it is working properly.
*After rebooting check the <code>sudo</code> command to ensure it is working properly.
==Terkait==
*[[Upgrade Ubuntu 20.04 ke Ubuntu 21.04 menggunakan Command Line]]
*[[Ubuntu:FAQ]]
*[[Ubuntu:Merubah Password]]
*[[Ubuntu:Delete Folder]]
*[[Ubuntu:Permission File]]
*[[Ubuntu:Resolve Sudo Name Resolution]]
*[[Ubuntu:Menambahkan User]]
*[[Ubuntu:Show File Size]]
*[[Ubuntu:Delete User]]
*[[Ubuntu:Encrypt File]]
*[[Ubuntu:Create Partitions]]


==Source==
==Source==

Latest revision as of 23:37, 23 November 2025

  • 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