linux 系统 第一章 -1

190 阅读1分钟

1、关闭防火墙软件

systemctl stop firewalld.service---暂时关闭防火墙

systemctl status firewalld.service---查看防火墙状态

永久关闭防火墙--systemctl disable firewalld.service

2、selinux

2.1 简介

SELinux,Security Enhanced Linux 的缩写,也就是安全强化的 Linux,是由美国国家安全局(NSA)联合其他安全机构(比如 SCC 公司)共同开发的,旨在增强传统 Linux 操作系统的安全性,解决传统 Linux 系统中自主访问控制(DAC)系统中的各种权限问题(如 root 权限过高等)。

SELinux 项目在 2000 年以 GPL 协议的形式开源,当 Red Hat 在其 Linux 发行版本中包括了 SELinux 之后,SELinux 才逐步变得流行起来。现在,SELinux 已经被许多组织广泛使用,几乎所有的 Linux 内核 2.6 以上版本,都集成了 SELinux 功能。

2.2 关闭selinux 模块

临时关闭

image.png

永久关闭

image.png

3、linux基础知识

3.1

root #表示用户

localhost #主机名

~ #家目录

##管理员用户

$ #普通用户

root #root的家目录

3.2 关机的命令

halt 立刻关机

poweroff 立刻关机

init0 立刻关机

shutdown-h now 立刻关机 root用户使用

3.3 重启

reboot

init6

shutdown-r now

3.4 修改颜色

[root@localhost ~]#vim /root/.bashrc

PS1='[\e[1;34m][\u@\h \W]$[\e[0m]'

[root@localhost ~]#source /root/.bashrc

4、shell

4.1 介绍

shell去通知操作系统需要进行什么样的操作(相当于解释层)内核相当于操作系统去指挥硬件硬件才能工作,否则无法交互。

bash是linux里面默认的shell程序位于/bin/bash csh ksh 语言不同比如中文英文都是交流的语言

image.png

5、命令行格式

5.1 格式

image.png

5.2 常见的快捷键

image.png

5.3 echo命令

作用: 将参数写到标准输出---相当于编程中的printf

具体表现

image.png

6、帮助手册man

image.png

image.png