Start Kali Linux with new hostname on every boot


In this article we will discuss how to start kali linux with new hostname on every boot? I did not need to revive an previous / useless thread, however this was such a fantastic thought it simply wanted a little bit updating. Learn also how to setup TOR in Kali Linux? Here is the review of Kali Linux 2017.2 this method 100% working on Kali Linux 2017.2

This article is written for the purpose of How to secure communication while Pentesting. reboot (or change) (start kali linux with new hostname) your hostname on each boot or by operating a service command with a view to keep away from the detection of getting a bunch named “kali-laptop” or “my_super_hacking_box”

I up to date your script a little bit bit so that (start kali linux with new hostname) it’ll work with the newest Kali Rolling 2016.2 which makes use of systemd – I referred to as mine (understand railgun scripting here)


cp -n /etc/hosts,.old

newhn=$(cat /dev/urandom | tr -dc 'A-Za-z' | head -c8)
hostnamectl set-hostname $newhn

echo "    localhost" > /etc/hosts
echo "    $newhn" >> /etc/hosts


Then create a file referred to as

In that file:

Description=Hostname Randomizer




Lastly you need to allow the service:

systemctl enable changehost.service

Now on boot your hostname ought to change as a part of the companies beginning. You too can invoke it anytime with

service changehost start

That’s it you should also read what are the best ways to learn Kali Linux

Here is the list of top 8 stealth scanning strategies of Kali Linux


Please enter your comment!
Please enter your name here