设置ip地址、子网掩码、广播
ifconfig pcn0 192.168.16.197 netmask 255.255.255.0 broadcast 192.168.16.255
设置默认网关
route add default 192.168.16.250
重启机器:reboot
查看主机信息:uname -a
查看主机名:hostname
转载自:http://rainbird.blog.51cto.com/211214/64732
solaris修改IP地址.刚装完solaris10的时候想到这个问题,还很郁闷不知道从哪开始.netconfig命令没有.看IP地址的配置文件不知道在哪,不像linux,连/etc/sysconfig文件夹都没有.不熟悉归不熟悉,研究过后现在已经可以凭着脑子把手工修改IP地址的过程默写下来了.所以,写原创没有侵权的意思,因为是我自己组织的思路.
Sun Solaris 修改IP地址或者主机名
)_od:[,qV01)如何修改IP地址和主机名
IP地址涉及的文件有: 杭州博客网*w Cu+U^J/o^2Yg
/etc/hosts (change the IP address)
ET!s$~o+Y-Qf#`0/etc/netmasks (if subnetting)
9M p'w7Wp0/etc/defaultrouter (to specify the new gateway for this subnet)
改变主机名涉及的文件有: 杭州博客网6wa.Z oV w
/etc/hosts (change to the new hostname)
g$c5C1R {!~,m6[/h%g0/etc/nodename (change to the new hostname)
7_.dy~4| ~ G/t)j0/etc/hostname.<interface> (where <interface> is the name of the primary 杭州博客网/n y1/kP;s
interface for this system, i.e hostname.hme0 or hostname.le0.
JtP.T;Q2FP"}0Change to the new hostname.) 杭州博客网V$tqW9S kK x,C
/etc/net/ticlts/hosts (change both columns to the new hostname)
7|E+Z%?A+[{-}s.O I0/etc/net/ticots/hosts (change both coluums to the new hostname)
5gSL)bA D&Tw0/etc/net/ticotsord/hosts (change both columns to the new hostname)
TH BZ0ymH@}0改完上述文件之后推荐重起一下机器