1. 显示主机名相关的操作
a. 显示主机名:[root@localhost root]#hostname
b. 设置主机名:[root@localhost root]#hostname yourpcname,但是这种修改主机名只是
针对对当次有效,下次启动后就会失效。
c. 另外一种修改主机名是通过更改etc/sysconfig/network中的配置,这种修改后要下次启动才会生效,
长期有效。
2. 关机重启命令
a. 重启[root@localhost root]#reboot
b.关机
[root@localhost root]#shutdown now ← 立刻关机
[root@localhost root]#shutdown +5 ← 5分钟后关机
[root@localhost root]#shutdown 10:30 ← 在10:30时关机
c.注销系统的logout命令
3. 网络相关
a. 查看网络配置:[root@localhost root]#ifconfig
b. 设置ip:[root@localhost root]#ifconfig eth0 yourip netmask yournetmask
c.启用网卡:[root@localhost root]#ifconfig eth0 up
d.禁用网卡:[root@localhost root]#ifconfig eth0 down
e.设置网关:[root@localhost root]#route add default gw yourgatewayip
f:删除网关:[root@localhost root]#route del default gw yourgatewayip
注意:上面用route,ifconfig的所有设置都只是针对
当次设置有效,下次重启后,设置就无效
如果有长期有效就要修改系统的配置文件,redhat 5的所有网卡配置文件存放在一个每户目录下,此目录是:etc/sysconfig/network-scripts,每一张网卡的配置存放为一个文件,
比如一般都有一個ifcfg-eth0
进去后设定如下几个参数,如果没有可以增加进去
IPADDR=192.168.1.59 ---设定ip
NETMASK=255.255.255.0 ---设定子网掩码
GATEWAY=192.168.1.1 ---设定网关
ONBOOT=yes ---是否在系统启动的时候启动此网卡
BOOTPROTO=static ---这里可以选择静态ip,
所以在这个目录下通过你的网卡名找到你的网卡配置文件,这样就不用每次进去就修改了。
其实配置网络方面,redhat enterprise linux 5提供一个图形界面只要输入setup命令,就能启动配置的相关界面,里面有设定网络参数的地方,进去后就和windows一样简单明了
分享到:
相关推荐
Redhat Enterprise linux5学习笔记,整套资料
RedHat EnterPrise linux 高可用集群技术
我觉的可以redhat enterprise linux分类
RedHat Enterprise Linux之raid5磁盘阵列
Redhat Enterprise Linux Advanced Server 4安装oracle11g
redhat linux enterprise 5教程文档,绝对是你学习LINUx的好帮手哦,亲!
RedHat Enterprise Linux Advanced server v3 安装 Oracle --MSN:zhoujianguo_leo@hotmail.com
Redhat Linux Enterprise 5下介绍的很详细的实用教程文档,是你学Linux的好帮手哦!亲
在RedHat Enterprise Linux 5下安装JDK
Mastering RedHat Enterprise Linux 3 Mastering RedHat Enterprise Linux 3
为Redhat Enterprise Linux 5开启samba
RedHat Enterprise Linux 7_x64 百度网盘下载链接
这是学习redhat enterprise linux 非常好的资料,值得拥有!!
介绍Redhat Enterprise Linux入门
RedHat Enterprise Linux 5(RHEL5)安装Oracle 11.1.0.6(11gR1)简要
Redhat.Enterprise.Linux.v6.iso镜像,可部署虚拟机一起
Redhat Linux Enterprise镜像从5.1到7.5的32位和64位操作系统的下载集合,文本是百度网盘共享出来的下载链接
一份很好的RedHat Enterprise Linux服务器管理书籍
网盘文件永久链接 RedHat Enterprise Linux (RHEL) 8.7 (x86_64, aarch64) Release.zip