hacktheworld Active Member Joined Mar 28, 2023 Messages 197 Reaction score 77 Credits 1,508 Oct 7, 2024 #1 I have typed on the terminal "sudo nano /etc/hosts" to check the host name on Kali Linux: In the attached screenshot the output, it is correct? Attachments Screenshot_2024-10-07_05-50-33.png 155.7 KB · Views: 75 Last edited: Oct 7, 2024
I have typed on the terminal "sudo nano /etc/hosts" to check the host name on Kali Linux: In the attached screenshot the output, it is correct?
CaffeineAddict Well-Known Member Joined Jan 21, 2024 Messages 1,689 Reaction score 1,201 Credits 14,028 Oct 7, 2024 #2 hosts file is not use used to determine hostname. it's used for manual DNS. To determine host name you have these commands and methods: hostname hostnamectl cat /etc/hostname I'm sure other methods exist too.
hosts file is not use used to determine hostname. it's used for manual DNS. To determine host name you have these commands and methods: hostname hostnamectl cat /etc/hostname I'm sure other methods exist too.
T Taylor_333 New Member Joined Apr 24, 2024 Messages 12 Reaction score 2 Credits 83 Oct 11, 2024 #3 Your command is good for editing the hosts file, but to check the hostname, use hostname or hostnamectl. They’ll show you the current hostname directly.
Your command is good for editing the hosts file, but to check the hostname, use hostname or hostnamectl. They’ll show you the current hostname directly.
wizardfromoz Administrator Staff member Gold Supporter Joined Apr 30, 2017 Messages 10,852 Reaction score 9,801 Credits 51,543 Oct 12, 2024 #4 @hacktheworld - 1. What is the output of Code: cat /etc/hostname 2. and what is showing in your Terminal prompt Cheers Wizard Last edited: Oct 12, 2024
@hacktheworld - 1. What is the output of Code: cat /etc/hostname 2. and what is showing in your Terminal prompt Cheers Wizard
Fanboi Well-Known Member Joined Apr 16, 2021 Messages 615 Reaction score 554 Credits 7,821 Oct 12, 2024 #5 wizardfromoz said: Code: cat /et/hostname Click to expand... *etc/ (my speed typing has far worse casualties)
wizardfromoz said: Code: cat /et/hostname Click to expand... *etc/ (my speed typing has far worse casualties)
wizardfromoz Administrator Staff member Gold Supporter Joined Apr 30, 2017 Messages 10,852 Reaction score 9,801 Credits 51,543 Oct 12, 2024 #6 Thanks, James