通用命令

RUI小于 1 分钟

查看CPU频率

watch grep \'cpu MHz\' /proc/cpuinfo

查看CPU温度

cat /sys/class/hwmon/hwmon*/temp*input

解压缩

 #解压
tar -zxvf test.tar.gz        
#压缩
tar -zcvf test.tar.gz ./test/ 

清理日志

#只保留两天的,其余全部删除
journalctl --vacuum-time=2d  

#删除bash历史
rm -rf ~/.bash_history
history -c

Debian换源

sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

bashrc备份

# ~/.bashrc: executed by bash(1) for non-login shells.
umask 022
PS1='\[\e[01;32m\]\u@\h\[\e[0m\]:\[\e[01;34m\]\w\[\e[0m\]\$ '
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

设置ssh密钥

curl https://github.com/bestruirui.keys >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v2.14.4