There was an error in this gadget

Saturday, April 10, 2010

How to find the hostname, domainname, ip and os installed in linux

To find the hostname:
You can find the host name using following commands

# hostname
OR
# uname -n
OR
# cat /proc/sys/kernel/hostname
OR
# sysctl kernel.hostname


To find the domainname:
You can find the domainname by

# dnsdomainname

To find the ip address:
You can find the ip address by

# ifconfig

OR

#route -n

To find which OS is installed in linux

# cat /etc/*release*
Or
#cat /etc/issue


.

No comments:

Post a Comment