Skip to main content

Debian 配置备份

软件源

apt edit-sources
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
apt update

小工具

apt install curl wget tmux bat htop exa neofetch trash-cli

alias

alias bat='batcat'
alias ll='exa -lha --modified --created --time-style long-iso --group-directories-first'
alias dc='docker-compose'
alias lzd='lazydocker'
alias rm='echo "please use trash-put"'

docker

wget https://get.docker.com/ -O get-docker.sh
# sh get-docker.sh --mirror Aliyun
sh get-docker.sh
systemctl enable docker

docker-compose

# wget https://ghproxy.com/https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -O /opt/docker-compose
wget https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -O /opt/docker-compose
chmod u+x /opt/docker-compose
ln -s /opt/docker-compose /usr/local/sbin/docker-compose

lazydocker

# wget https://ghproxy.com/https://github.com/jesseduffield/lazydocker/releases/download/v0.12/lazydocker_0.12_Linux_x86_64.tar.gz
wget https://github.com/jesseduffield/lazydocker/releases/download/v0.12/lazydocker_0.12_Linux_x86_64.tar.gz
mkdir ~/lazydocker
tar -zxvf lazydocker_0.12_Linux_x86_64.tar.gz -C ~/lazydocker
mv ~/lazydocker/lazydocker /opt/lazydocker
chmod u+x /opt/lazydocker
ln -s /opt/lazydocker /usr/local/sbin/lazydocker
trash-put ~/lazydocker
# rm -rf ~/lazydocker
# ~/.config/jesseduffield/lazydocker/config.yml
reporting: "off"
gui:
returnImmediately: true
commandTemplates:
serviceLogs: '{{ .DockerCompose }} logs --timestamps --follow --tail 500 {{ .Service.Name }}'
viewServiceLogs: '{{ .DockerCompose }} logs --tail 500 --follow {{ .Service.Name }}'
containerLogs: docker logs --timestamps --follow --tail 500 {{ .Container.ID }}
viewContainerLogs: docker logs --timestamps --follow --tail 500 {{ .Container.ID}}

croc

# wget https://ghproxy.com/https://github.com/schollz/croc/releases/download/v9.5.0/croc_9.5.0_Linux-64bit.deb
wget https://github.com/schollz/croc/releases/download/v9.5.0/croc_9.5.0_Linux-64bit.deb
dpkg -i croc_9.5.0_Linux-64bit.deb

bat

# wget https://ghproxy.com/https://github.com/sharkdp/bat/releases/download/v0.18.3/bat_0.18.3_amd64.deb
wget https://github.com/sharkdp/bat/releases/download/v0.18.3/bat_0.18.3_amd64.deb
dpkg -i bat_0.18.3_amd64.deb