8.14第十课课堂笔记

如何制作本地yum源:

1、先用reposync将源同步到本地

2、通过createrepo创建repodata,repodata存储了各个rpm包的依赖关系

3、搭建http的服务器/nginx服务将源发布

4、配置客户端使用 vim /etc/yum.repos.d/base.repo

[local]

name=local

baserul=http:// ..../

enabled=1

gpgcheck=0

关闭防火墙:

1、firewalld

2、systemctl stop firewalld

3、systemctl disable firewalld

4、selinux


Linux 可以记录每个用户所使用的命令, 并记录到 ~/.bash_history 文件中
当用户以 bash 登入 Linux 主机后, 系统会主动地由 ~/.bash_history 读取命令历史
当用户注销时, 会将最近的 HISTFILESIZE 个记录写入 ~/.bash_history 文件中

当用户以 bash 登入 Linux 主机后, 系统会主动地由 ~/.bash_history 读取命令历史

按一下:能进行 『命令』 以及 『文件名』 的补全
按两下:能够罗列出所有符合补全的可能选项  

Centos7中tab键支持命令参数补全,需要安装一个包bash-completion

>覆盖

>>追加

> /dev/null 空洞

shelle.sh > output 2>&1

while ((1==1));do echo nihao >/dev/null;done 

foreground: 前台, 平常执行命令的界面
background: 后台, 看不到的地方
什么样的工作适合放到后台: 不需要与用户交互的命令
放入后台的工作是无法用 Ctrl + c 来终止的
后台的工作有两种状态: 暂停(stop) 和 运行中( running)

pkill+pname

kill+pid

kill -9 强制删除

由字母、数字、下划线组成,且只能以非数字开头

变量名=变量值

如果变量值中存在空格,需要用单引号或双引号将变量值括起来

如果变量值中有引用其他变量,需要用双引号将变量值括起来

猜你喜欢

转载自blog.csdn.net/m0_37680417/article/details/81674005