xv6 setup on Windows machines via WSL ------------------------------------- 1. Install WSL-2 by following the steps listed here : https://learn.microsoft.com/en-us/windows/wsl/install 1.1 If it is a fresh install, it will install Ubuntu 24.04.1 1.2 If not then please install Ubuntu 24.04.1 1.3 First time installation requires a restart! 2. Now open up wsl-terminal 3. Execute `sudo apt-get update` 4. Execute `sudo apt install -y make` to install make 5. Execute `sudo apt install -y gcc-11` 5.1 xv-6 requires gcc-11 to compile flawlessly 5.2 Execute `sudo ln -s /usr/bin/gcc-11 /usr/bin/gcc` so that it can find `gcc` 6. Execute `sudo apt install -y qemu-system-i386` 7. Execute `curl https://www.cse.iitb.ac.in/~puru/courses/xv6-public.tar.gz --output xv6.tar.gz` to get the xv6 source 8. Execute `tar -xvzf xv6.tar.gz` to uncompress the source. It will be uncompressed to directory named `xv6-public` 9. Navigate to the xv-public directory by `cd xv6-public` 10. Execute `make qemu-nox` or `make qemu` 11. Now after a successful build a new terminal would be visibile, running xv6. 12. Execute `ls` to display the currently available files. 13. Execute `echo "helloworld! > hw.txt` 14. Execute `cat hw.txt` 15. Execute `wc hw.txt` To exit qemu press `Ctrl-A x`