The system hostname is configured in /etc/hostname. A change made to this file will take effect after reboot.

At boot time the string in /etc/hostname is loaded into the kernel using the hostname command. If you edit /etc/hostname then you should also set the system hostname manually using the hostname command.

sudo hostname mismis


Note that in Debian and Ubuntu the system hostname is the short hostname, not a fully qualified domain name.

If the machine has a static external IP address ADRS then this address and the hostname should appear on a line in /etc/hosts, as follows.

ADRS &lt;hostname&gt;


If the machine has a static fully-qualified domain name then this should appear first after the IP address on the line and the short hostname should follow it.

ADRS &lt;fully-qualified-hostname&gt; &lt;short-hostname&gt;


In the present case, assuming that the external IP address is 178.162.231.61 and the desired canonical hostname is "mismis.com", the /etc/hosts line should look like the following.

178.162.231.61 mismis.com mismis


If the machine has no static external IP address, but gets assigned addresses dynamically via DHCP, for example, then 127.0.1.1 should be used instead.

127.0.1.1 mismis.com mismis


or

127.0.1.1 mismis


In /etc/hosts, any IP address should appear on at most ONE line. On that line the first domain name that follows the IP address is the canonical hostname associated with that IP address, and any subsequent domain names are aliases for the canonical hostname.

how to change my hostname?
I am developing a project with custom module of my own.There is a situation i want to filter all the products of the store with my custom logic having data provided by each user from the cookie.Other products will not be displayed in any part of the website to the same user.Whether it is related products block or from any slider etc.Which model should i overwrite in order to filter default product collection ?
