From a41adb9461220459a5bd06acae6758253d0157b2 Mon Sep 17 00:00:00 2001 From: gwbeip Date: Fri, 19 Sep 2025 16:19:43 +0800 Subject: [PATCH] add zsh confiuration --- config_new_archlinux_in_wsl.md | 61 ++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 config_new_archlinux_in_wsl.md diff --git a/config_new_archlinux_in_wsl.md b/config_new_archlinux_in_wsl.md new file mode 100755 index 0000000..d1afc0b --- /dev/null +++ b/config_new_archlinux_in_wsl.md @@ -0,0 +1,61 @@ +# Configure New Archlinux in WSL + +## Add user `gwb` + +```shell +cd +pacman -Syu +useradd -m gwb +``` + +run +```shell +passwd +``` +to set a password for `root` + +run +```shell +passwd gwb +``` +to set a password for user `gwb` + +## Add user `gwb` into group `sudo` + +```shell +pacman -S sudo +pacman -S vim +``` +edit `/etc/sudoers` +uncomment `%wheel ALL=(ALL:ALL) ALL` +```shell +usermod -aG wheel gwb +``` + +## Install and configure `ZSH` + +```shell +pacman -S zsh +pacman -S git +pacman -S fzf +pacman -S zoxide +pacman -S starship +pacman -S python +su gwb +cd +git clone https://gitea.meip.work/gwbeip/TerminalPolyjuice.git $HOME/.TerminalPolyjuice +chsh -s /bin/zsh +exit +su gwb +cd +mkdir .config +cd $HOME/.TerminalPolyjuice/zsh +zsh polyjuice.sh install_ohmyzsh config_starship check +``` + +add the contents in `$HOME/.TerminalPolyjuice/zsh/zshenv` into `$HOME/.zshenv` + +# Set `gwb` as default user +```shell +wsl --manage archlinux --set-default-user gwb +```