About Linux
原创2022/4/1...大约 1 分钟
About Linux
tips
Debian-Like
# print installed packages
dpkg -l | grep '^ii' | awk '{print $2}'
# purge auto-removeable packages
sudo apt-get -y autoremove && sudo apt-get -y purge $(dpkg -l | grep '^rc' | awk '{print $2}')
apt-get -y autoremove && apt-get -y purge $(dpkg -l | grep '^rc' | awk '{print $2}')
# use resolv.conf by systemd-resolve-generate
rm /etc/resolv.conf
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
# wget
wget -N -c --content-disposition "http://xxx.xx/xxx.xxx"
# ssh
ssh -o ProxyCommand="nc -X 5 -x 192.168.1.1:10808 %h %p" github.comubuntu
ping command in iputils-ping
USTC源
配置生成器(支持URL获取)
https://mirrors.ustc.edu.cn/repogen
https://mirrors.ustc.edu.cn/repogen/conf/debian-https-4-bullseye
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
# deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free如果你在使用 Debian 8 “Jessie” 或更早的版本,则默认的 debian-security 源地址为 http://security.debian.org/ (和新版不同最后没有子目录)。
从 Debian 11 “Bullseye” 开始,安全更新仓库名从 发行版代号/updates 更新为 发行版代号-security,详见 Debian 11 (bullseye) 发行说明,请旧版本用户注意。
deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib
# deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib模板记录
vm-tmp-ub
# bionic-netboot-20181017
apt
authorized_keys
swap fstab
apt-get install "vim" "sudo" "bash-completion" "curl" \
"aptitude" "screen" "screenfetch" "irqbalance" \
"haveged" "python-pip" "python3-pip" \
"net-tools" && \
apt-get purge "linux-firmware" "linux-modules-extra-4.15.0-36-generic" \
"iw" "language-pack-en-base" "dictionaries-common" "wamerican" && \
apt-get autoremove && apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')vm-tmp-d9
# stretch-netboot-20181022
apt
authorized_keys
swap fstab
grub-time
apt -y install "vim" "sudo" "bash-completion" "curl" \
"aptitude" "screen" "screenfetch" "irqbalance" \
"haveged" "python-pip" "python3-pip" \
"net-tools" "dnsutils" "netcat-traditional" \
"apt-listchanges" "lsb-release" "traceroute" "lsof" "less" \
"hdparm" "man-db" "doc-debian" && \
apt -y purge "linux-image-4.9.0-7-amd64" && \
apt -y autoremove && apt-get -y purge $(dpkg -l | grep '^rc' | awk '{print $2}')
# stretch-netboot-20181111
English->China->Chinese->ftp.cn->cache3142
group:ssh发行版
- Debian/Ubuntu
- CentOS/Scientific Linux