Below step by step to edit or change hostname of Junos OS:
Enter to the configuration mode.
Then we edit the system.
Set hostname by using the following command.
set host-name Junos
Above we use
Junos as the hostname.
Finally, we commit the changing of hostname by using the following command.