Skip to content

Instantly share code, notes, and snippets.

View SYXiao2002's full-sized avatar

Fused_Buzzer SYXiao2002

  • liverpool
View GitHub Profile
@dentechy
dentechy / WSL-ssh-server.md
Last active July 14, 2024 03:54
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@yig
yig / update_mactex.md
Created August 9, 2018 21:23
Instructions for updating MacTeX's BasicTeX every year

Once you get the dreaded error message that tlmgr won't install any new packages, it's time to upgrade to the latest texlive.

  1. Save list of currently installed packages:

     tlmgr list --only-installed > previously_installed_texlive_packages.txt
    
  2. Download and install the latest BasicTex.pkg: http://www.tug.org/mactex/

  3. Save list of default packages:

@estsaon
estsaon / wsl-port-forwarding.md
Last active July 19, 2024 03:06
How to SSH into WSL2 on an external Window

WSL:

  1. Install openssh-server:
sudo apt install openssh-server
  1. Add or uncomment following lines in /etc/ssh/sshd_config: