title: Changing a hostname permanently in Ubuntu
body: <p>I want to create a shell script that can change the hostname of my Ubuntu permanently. Whenever I use the <code>hostname New_hostname</code> command, it returns to the original hostname after I restart the machine. </p>
  
  <p>I found out that the only way I can change this permanently is by modifying the file in <code>/etc/hostname</code> and save it. Is there some way I can do this using a shell script only? I also have a password.</p>