Closed Thread
Results 1 to 6 of 6

Thread: How to determine Server Name in Linux

  1. #1
    Off
    Off is offline Learning Programmer
    Join Date
    Feb 2008
    Posts
    83
    Rep Power
    0

    How to determine Server Name in Linux

    I know the default value is 'localhost' but I want the real network name. How can I determine the network name of my server inside of a Linux from an SSH command prompt?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest
    Do:

    Code:
    # cat /etc/hosts
    Which should give you the host name.

  4. #3
    Hektor is offline Programmer
    Join Date
    Jan 2007
    Posts
    126
    Rep Power
    0
    Can't you also connect to a network share and see it? Or do a reverse resolve?

  5. #4
    LinuxBomber is offline Learning Programmer
    Join Date
    Jan 2008
    Posts
    79
    Rep Power
    0
    Doesn't Linux has something like 'localhost'??

  6. #5
    Off
    Off is offline Learning Programmer
    Join Date
    Feb 2008
    Posts
    83
    Rep Power
    0
    I know localhost, all computers (Win, Mac, Linux) have localhost which equals 127.0.0.1. I need the fully qualified host name.

  7. #6
    v0id is offline Retired
    Join Date
    Apr 2007
    Posts
    2,937
    Blog Entries
    3
    Rep Power
    42
    Have you tried hostname?
    Code:
    $ hostname

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Intermediate A simple TCP server using Linux C API
    By fayyazlodhi in forum C Tutorials
    Replies: 4
    Last Post: 07-14-2011, 11:37 AM
  2. remote commands to windows server from linux server
    By centsinger in forum PHP Development
    Replies: 2
    Last Post: 06-15-2010, 08:00 AM
  3. how can i use of my linux server as a proxy server?
    By alilg in forum Linux Networking
    Replies: 4
    Last Post: 12-06-2009, 12:52 PM
  4. linux server
    By moonknight in forum Linux/Unix General
    Replies: 13
    Last Post: 02-07-2009, 06:58 AM
  5. Transform any Linux OS into a server?
    By racerman in forum Linux/Unix General
    Replies: 5
    Last Post: 02-05-2009, 07:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

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