Skip to content

Instantly share code, notes, and snippets.

@peter-y
Created August 24, 2021 07:58
Show Gist options
  • Save peter-y/6d8b88b852d2e1c0a5547fd2c55f2f5b to your computer and use it in GitHub Desktop.
Save peter-y/6d8b88b852d2e1c0a5547fd2c55f2f5b to your computer and use it in GitHub Desktop.
linux #command
#过滤注释行
bat /etc/redis.conf | grep -v ^# |grep -v ^$
#代理命令
alias pc="proxychains4"
#显示命令历史 ~编号 使用指定的
dirs -v
#文件夹名称快速跳转
j
#修改系统变量 或内核变量
sysctl
sudo sysctl net.ipv4.conf.all.forwarding
#CPU信息
cat /proc/cpuinfo
#linux kernel版本
cat /proc/version
sudo dnf repolist -v
systemctl is-active docker
systemctl is-enabled docker
ps aux
#解压文件到指定的目录
unzip xxx.zip -d xxx
#可以查看文件的实际占用大小
ls -alhs
#查看系统支持的文件系统
less /proc/filesystems
#指定用户执行命令
sudo -u www command
#新的包管理器
dnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment