Make writing a habit together! This is my first day to participate in the “Gold Digging Day New Plan · April More text challenge”, click to see the details of the activity.
Since I bought my computer in my freshman year, the system disk is very small, while WSL is installed in disk C by default, occupying at least 20G. This paper is used to record the bumpy migration process.
record
-
First download tool LxRunOffline, do not download other versions, there are pits
-
Download unzip, open command line in this directory, run view subsystem, remember the name and so on.
./LxRunOffline.exe list Copy the code
-
Check the directory where the subsystem resides:
# Enter your subsystem name./ lxrunoffline. exe get-dir -n UbuntuCopy the code
-
Set the destination directory permissions, that is, the file directory you want to migrate to:
Icacls F:\Ubuntu /grant "Your username :(OI)(CI)(F)"Copy the code
-
If you don’t know what the last user name was, you can use the whoanmi command to check:
-
Starting the migration
Exe move -n Ubuntu -d F:\Ubuntu\UbuntuCopy the code
-
Wait patiently for completion
-
You can also use the following command to check whether the installation path is correct:
./LxRunOffline.exe get-dir -n Ubuntu Copy the code
Install the WSL
By the way, update the installation process of WSL and OH-my-ZSH under Win11
-
All you need to do is enter:
wsl --install Copy the code
-
The default is Ubuntu, but you can also choose from other Linux distributions by clicking here
-
After the installation is complete, restart the application, go to Ubuntu, open the application, and set the username and password
-
Better used with Windows Terminal.
oh-my-zsh
Only installation, plug-in related can search ✔️
-
First, install ZSH
sudo apt install zsh Copy the code
-
Make it the default shell
chsh -s $(which zsh) Copy the code
-
Restart the terminal and enter echo $SHELL. If /bin/zsh is displayed, the configuration is successful
-
Then install oH-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" Copy the code
-
If you get an error, go to the site and copy the entire content and paste it into a test.sh file
Chmod +x test.shCopy the code