hacktheworld Active Member Joined Mar 28, 2023 Messages 277 Reaction score 114 Credits 2,104 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: 180 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,774 Reaction score 1,310 Credits 14,655 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 11,045 Reaction score 10,047 Credits 53,025 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 787 Reaction score 756 Credits 10,277 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 11,045 Reaction score 10,047 Credits 53,025 Oct 12, 2024 #6 Thanks, James