1、修改主机名

[root@localhost ~]# cat /etc/hostname
localhost.localdomain
[root@localhost ~]# hostnamectl set-hostname server28.example.com
[root@localhost ~]# cat /etc/hostname
server28.example.com
注:在Rhel7中主机名的信息存储在/etc/hostname中,而不再是/etc/sysconfig/network

2、启动/关闭/重启/查看服务(systemctl  start/stop/restart/status  services)

[root@localhost ~]# systemctl start firewalld     启动防火墙
[root@localhost ~]# systemctl stop firewalld     关闭防火墙
[root@localhost ~]# systemctl restart firewalld     重启防火墙
[root@localhost ~]# systemctl status firewalld     查看防火墙状态

[root@localhost ~]# systemctl list-unit-files     查看系统所有服务的状态

3、设置服务的自启动

[root@localhost ~]# systemctl enable sshd     设置sshd开机自动
[root@localhost ~]# systemctl disable sshd     设置sshd不开机自启

4、进入紧急/图形/单用户/拯救模式

[root@localhost ~]# systemctl isolate

emergency.targer     graphical.target     multi-user.target     rescue.target

5、关机/重启

[root@localhost ~]# systemctl halt     关机

[root@localhost ~]# systemctl reboot     重启

6、更改时区

到/usr/share/zoneinfo/下找到对应的时区文件,例如Asia/Shanghai

对应的拷到/etc/localtime,例如cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

7、root用户密码忘记后,如何进入单用户更改root用户密码

  启动电脑,按上下键进入启动菜单界面,选择第二个Red Hat Enterprise Linux Server, with Linux 0-rescue-*

  

  按 'e'进入编辑模式

  

  在linux16 /vmlinuz-*这行的末尾添加“ rd.break”,然后按“Ctrl+x”进入单用户模式

  

  当进入用户模式后出现以下窗口,执行以下命令,(确认根目录不是只读挂载,具有可写权限)

  

  执行password更改root用户密码

  

  执行touch /.autorelabel

  

  按两次“Ctral+d”登录系统咯!!!!

-------end-------

  

  

Rhel7的基本使用的更多相关文章

  1. Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7

    SOLUTION VERIFIED September 13 2016 KB1248793 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  2. Create a Team in RHEL7

    SOLUTION VERIFIED September 13 2016 KB2620131 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  3. rhel7 单用户修改root密码

    rhel7密码忘记的时候,可以通过单用户模式修改密码 1.修改 引导文件,添加rw init=/sysroot/bin/sh ,ctrl+x启动 2.切换根chroot /sysroot3.使用pas ...

  4. RHEL6和RHEL7恢复root用户密码

    一.RHEL6恢复root密码 将系统重启,出现如下界面按上下键选择会停住,并输入e键 选中下图红框选项,再输入e键 再输入1,进入单用户模式 输入b进行启动   修改密码,然后重启 二.RHEL7恢 ...

  5. Linux(RHEL7.0)下安装nginx-1.10.2

    查看当前系统版本是否支持 当前,nginx发布包支持以下Linux操作系统版本: RHEL/CentOS: Version Supported Platforms 5.x x86_64, i386 6 ...

  6. RHEL7.2和RHEL6.5的配置网络yum源和本地yum源

    RHEL7.2配置本地yum源 [root@localhost ~]#monut /dev/sr0 /mnt      #挂载光盘 [root@localhost ~]# rm -rf /etc/yu ...

  7. RHEL7 CentOS7 检查查看精简指令

    RHEL7 CentOS7 检查查看精简指令: //////////////////////////检查查看精简指令://///////////////////////////// ///////// ...

  8. Thinkstation center M8600t装RHEL7不能联网,网卡驱动没装问题

    Thinkstation center M8600t装RHEL7时不能联网,配置ip也不可以,后来发现网卡驱动没有安装.可以通过装网卡驱动的方式解决问题,解决方法如下: root登录 lspci |  ...

  9. 红帽RHEL7版本RHCE认证学习及考试经历

    RHCE是红帽公司推出的Linux系统的中级认证,考试全部采取上机形式,在考察考生的基础理论知识的同时还能考察实践动手操作能力,在Linux领域的价值是不可否认的,所以对于期望从事相关行业的同学们在上 ...

  10. RHEL7 修改SSH默认端口及修改SELinux运行状态

    RHEL7安装后,默认开启SSH服务以便远程配置,但默认端口22并不安全,一般不建议使用默认端口,那就修改SSH默认端口.在sshd_config里面的修改RHEL7.0上修改和7.0以下类似,但要注 ...

随机推荐

  1. MySQL 定时器EVENT学习

    原文:http://blog.csdn.net/lifuxiangcaohui/article/details/6583535 MySQL 定时器EVENT学习 MySQL从5.1开始支持event功 ...

  2. 【服务器防护】iptables 配置详解(非常棒的案例)

    一. iptables 基本命令使用举例 链的基本操作 1.清除所有的规则.1)清除预设表filter中所有规则链中的规则.# iptables -F2)清除预设表filter中使用者自定链中的规则. ...

  3. rsync同步完整配置

    一.需求: 1.对于分公司访问一些服务器(如工程图纸服务器),如果通过Internet上的VPN访问总是觉得速度慢,毕竟带宽有限,为了解决此问题,可以两地建立同步镜像服务器,分公司可以访问本地的镜像服 ...

  4. 一次DB2数据库连接失败(SQLSTATE=08001)的解决方法

    有一次,在使用DbVisualizer工具连接自己linux虚拟机上的DB2数据库时,报如下错误: Product: DbVisualizer Pro 9.1 Build: #2050 (2013/0 ...

  5. tif图片编辑利器

    http://www.onlinedown.net/soft/99112.htmTIF编辑器 0.4 http://www.zjda07.cn/软件类别:国产软件/图像处理软件大小:1089KB软件授 ...

  6. JSP Scripting Element

    There are five different types of scripting elements Scripting Element Example Comment <%-- comme ...

  7. Apache Commons fileUpload实现文件上传之一

      需要两个jar包: commons-fileupload.jar Commons IO的jar包(本文使用commons-io-2.4.jar) 利用Servlet来实现文件上传. package ...

  8. 反编译工具reflector破解方法

    文件下载:http://files.cnblogs.com/lori/Red.Gate.Reflector7.6.rar 破解方法: 1. 断网2. 运行.NET Reflector,点击Help - ...

  9. nodeschool.io 6

    ~~ MAKE IT MODULAR ~~ This problem is the same as the previous but introduces the concept ofmodules. ...

  10. sina 行情api

    http://blog.csdn.net/simon803/article/details/7784682