09day 命令提示符优化及yum优化
export PS1='\[\e[32;1m\][\u@\h \W]\$ \[\e[0m\]'
设置颜色 内容 结束
export PS1='\[\e[30;1m\][\u@\h \W]\$ \[\e[0m\]' -- 黑色提示符
export PS1='\[\e[31;1m\][\u@\h \W]\$ \[\e[0m\]' -- 红色提示符
export PS1='\[\e[32;1m\][\u@\h \W]\$ \[\e[0m\]' -- 绿色提示符
export PS1='\[\e[33;1m\][\u@\h \W]\$ \[\e[0m\]' -- 黄色提示符
export PS1='\[\e[34;1m\][\u@\h \W]\$ \[\e[0m\]' -- 蓝色提示符
export PS1='\[\e[35;1m\][\u@\h \W]\$ \[\e[0m\]' -- 粉色
export PS1='\[\e[36;1m\][\u@\h \W]\$ \[\e[0m\]' -- 浅蓝
export PS1='\[\e[37;1m\][\u@\h \W]\$ \[\e[0m\]' -- 白色
3) 操作系统优化---yum下载源优化
yum软件优势: 简单 快捷
01. 不需要到官方网站单独下载软件包(yum仓库)
02. 可以解决软件的依赖关系
yum优化方法:
01.yum install -y vim tree wget net-tools nmap bash-completion(补全centos7的部分命令参数)
02. 优化基础的yum源文件
通过阿里镜像源进行优化: curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
03. 优化扩展的yum源文件
通过阿里镜像源进行优化: wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
检查可用的yum源信息
yum repolist
实际下载软件
yum install sl cowsay -y --- 需要优化epel扩展源
sl
cowsay oldboy-sz-01
animalsay oldboy-sz-01