Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: host name

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    host name


    when I open a shell tjhe prompt in my system is

    <name>@localhost

    this despite the fact teh machine has been asiigned a definite name by the dhcp server.
    why does my machine does not recognize its own name?

  2. #2
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Location
    Knee deep in Grand Rapids, Michigan
    Posts
    3,901
    The dhcp server assigns you an ip address, it has nothing to do with the hostname.
    To change the your hostname do
    Code:
    nano -w /etc/hostname
    Change it to whatever you like.
    Hit Ctrl + x to quit, say y to save your work, hit Enter.
    Hostname changed.
    If you want to learn more about linux take a linux journey
    https://linuxjourney.com/
    Use CODE tags when posting output of commands. Thank you.
    https://www.linuxcounter.net/cert/608410.png

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •