alias cdnet=“cd /etc/sysconfig/network-scripts/” alias 取别名 方便操作
alias cdnet
systemctl restart network 重启网络
./source bashrc 放到内存去 读取
.bashrc 隐藏的 查看需要用ls -a
alias enable=who
enable 执行 who的情况 别名的权限高
unalias 删除别名
enable -n 禁用内部命令 内外部都存在的机制 输入 type 查看
enable cmd 启用
ls 有别名 取消用别名可以加’'或者\ 或command
which --skip-alias ls 取消显示别名路径,只显示文件路径
cat 查看,程序没终止 可以按CTRL+D取消
Ctrl+c 可能丢失数据
logout注销
长的命令可以换行
date 是内核时间 clock 硬件时间
date 122516282018.30 月 日 时分年秒
date +%s 离1970年1月1日有多少秒
timedatectl list-timezones 查看所有时区
timedatectl set-timezone Asia/Shanghai 设置上海时区,大小写敏感
timedatectl status 查看当前时区
centos7的命令timedatectl
6的是tzselect
/etc/loacltime =/usr/share/zoneinfo/Aisa/
cal查看日历
shutdwon -r 5 5分钟之后重启
/etc/sysconfig/i18n 文字
echo $LANG 查看文字编码
wall ""广播
远程同屛
df 光盘 路径
lsblk /run/media/root/CentOS\ 7\ x86_64/
ls 在packages 里 pwd ls 红色
rpm -ivh screen 按tap 自动
也可以直接rpm -ivh /run/media/root/cd路径
screen -s 会话名
其他人screen -x 会换名
ctrl+a+d 退出
detached 剥离
网络断的
执行长时间的操作可以先创建screen ,防止操作停止
screen -r 继续执行
echo回显
\n换行 \t制表符 \v垂直的制表符
echo -e "\a"发出声音
hexdump -c f1
bc 等于计算器 quit 退出
查看二进制
obase =多少()进制
rm -f /etc/motd 传文件 (可以写提示)centos7使用
rm -f /etc/motd
cd /etc/
rz centos6不适用