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. iOS开发之 Xcode 6 创建一个Empty Application

    参考链接http://jingyan.baidu.com/article/2a138328bd73f2074b134f6d.html Xcode 6 正式版如何创建一个Empty Applicatio ...

  2. Android_程序结构分析

    一.Android程序运行过程 二.Android项目结构  

  3. git相关资料

    Git教程http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/git - 简明指南ht ...

  4. python 集合

    面向对象的集合: #coding:utf-8 __author__ = 'similarface' class Set: ''' list实现集合,及其集合操作 ''' def __init__(se ...

  5. Java GC系列(3):垃圾回收器种类

    本文由 ImportNew - 好好先生 翻译自 javapapers. 目录 垃圾回收介绍 垃圾回收是如何工作的? 垃圾回收的类别 垃圾回收监视和分析 在这篇教程中我们将学习几种现有的垃圾回收器.在 ...

  6. jquery 设置css样式

       $("#61dh a").css('color', 多个样式属性 var divcss = { background: '#EEE', width: '478px', mar ...

  7. C# BackgroundWorker的使用 转

    转自http://www.cnblogs.com/tom-tong/archive/2012/02/22/2363965.html  感谢作者详细的介绍 C# BackgroundWorker的使用 ...

  8. Pictures of Ascii Art

    简述 指尖上的艺术 - 通过键盘上韵律般的敲敲打打,一幅幅美轮美奂的艺术作品便跃然于屏. 这样的画作,包含了无穷的创意,糅合了现代计算机科技与传统绘画艺术,难道还有比这更令人陶醉的美妙事物吗? 简述 ...

  9. datagridview 中添加了一个button类型的列,怎么写button的事件

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  10. STL中vector的用法

    vector是标准模板库的一种容器,是可存放各种类型的动态数组. #include<iostream> #include<vector> using namespace std ...