Linux 装机配置

新建用户

/sbin/useradd –d /home/xxx -m xxx
-d指定用户目录,-m表明新建目录,xxx为用户名

开启sudo

  • 安装sudo
    apt install sudo
  • 加进sudo用户组
    /sbin/usermod -aG sudo xxx
    然后exit再连接

zsh

1
2
3
4
5
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

docker

1
2
3
curl -fsSL https://get.docker.com | bash -s docker
dockerd-rootless-setuptool.sh install
sudo systemctl disable --now docker containerd docker.socket

把以下放入~/.zshrc

1
2
export PATH=/usr/bin:$PATH
export DOCKER_HOST=unix:///run/user/1000/docker.sock

source ~/.zshrc

systemd

1
sudo loginctl enable-linger xxx