Find the answer to your Linux question:
Results 1 to 5 of 5
Can anybody tell me how to find out Host anem onLinux mahcine. I tried hostname command but it is not working....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    1

    Findout Hostname on Linux


    Can anybody tell me how to find out Host anem onLinux mahcine.
    I tried hostname command but it is not working.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    hi pashende !!

    I tried hostname command but it is not working.
    $ hostname
    or
    $ echo $HOSTNAME

    <=== { casper } ===>
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    And other option could be:

    Code:
    cat /proc/sys/kernel/hostname
    This is a read-write file, so you can do (as root):

    Code:
    echo myname > /proc/sys/kernel/hostname

    Best regards

  4. #4
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Or, you can simply type uname at the command line.

  5. #5
    Linux Newbie jagernout's Avatar
    Join Date
    May 2006
    Location
    Indonesia
    Posts
    102

    hostname

    To view your hostname : #hostname
    To change your hostname : #hostname [host_name]

    Regards,
    -JG-

Posting Permissions

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