# Extras

# Browse the Linux filesystem just like \\wsl\

There's a way to browse the Linux filesystem with Windows Explorer just like WSL2 does, and it's by installing and running a couple apps. You need:

  1. WinFSP
  2. SSHFS-Win
  3. SSHFS-Win-Manager

Basically you install all 3 apps, then use the SSHFS-Win-Manager to connect to your distro. Remember to use localhost as your hostname, and use either user/password or user/keyfile combination to create the drive. Pick one (or leave it on Auto) and once you connect, it'll create a drive that looks like a network drive, but it's attached to your Linux filesystem and you can use it just like that, automagically!

# Ubuntu-related developer extras

# Add swap

This is in case you don't have much RAM, but you have HDD space to spare:

SIZE=32G
sudo fallocate -l $SIZE /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show

# Install/upgrade Docker and Docker Compose

sudo docker kill $(docker ps -q)

sudo apt update
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt remove --purge -y docker docker-engine docker.io containerd runc docker-ce docker-ce-cli containerd.io docker-compose
sudo rm -rf /usr/local/lib/docker/cli-plugins/docker-compose

sudo apt install -y wget gnupg2 apt-transport-https ca-certificates curl gnupg lsb-release
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
sudo docker compose version

# Install Google Chrome

sudo apt install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb

# Install .NET Core SDK

sudo apt install -y wget
wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-6.0
dotnet --version
dotnet

# Install Node.js

sudo apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
node -v
sudo npm i -g npm
sudo npm i -g npm
sudo npm i -g npm
sudo npm i -g npm
sudo npm i -g npm
node -v