Linux基础入门-DAY2
free -h 查看内存使用
init 3 关闭图形界面
Init 5 开启图形化界面
runlevel 查看当前运行级别
whoami 查看自己身份
tty 当前终端窗口名
w 查看目前登陆用户操作
/etc/shells 查看所有shell
echo $SHELL 查看当前使用shell
hostnamectl sethostname xxx 永久保存
centos7和ubuntu18.04以上
hostname _不能使用
/etc/hostname
提示符
$ 超级用户
# 普通用户
$PS1
修改提示符
PS1=“”
Centos /etc/profile.d/
Ubuntu .bashrc
enable 查看内部命令 集成在shell中
type 查看类型
$PATH path变量
hash 记录命令执行缓存
hash -d xxx 删一个
hash -r 全部删除
命令执行顺序 别名 内部命令 外部命令
\ ‘’ 跳过别名
.bashrc 当前用户
/etc/bashrc 所有用户
非交互批量执行 ‘ ;’
\ 主动换行
lscpu
/proc/cpuinfo
free
/proc/meninfo
lsblk 硬盘
/proc/partitions
arch 查看架构
uname -r 内核版本
/etc/release 查看操作系统
lsb-release -a = /etc/redhat-release
日期和时间
Linux 两个时钟
系统时间- Linux内核通过CPU工作频率进行 date
硬件时间-主板 clock
timedatectl 时区
cal 日历
/etc/motd 登陆提示
screen 维持会话
tmux 会话工具
hexdump 查看文本中二进制格式
dos2unix
unix2dos
ASCLL 128个字符 0-127
` ` 等价 $( )
帮助
help + 内部命令
外部命令 + —help
man
info
浙公网安备 33010602011771号