I had a spare 250 GB hard drive laying around so I decided I would set up Linux with it. I had a linux distro installed on my laptop before and was doing dual boot, but I only have around 50GB of space left so I didn’t want to partition 20-30GB for another OS again.
To begin this project, I formatted the hard drive using Disk Management which took a few hours. Then, I formatted a USB drive and used Balena Etcher to flash Ubuntu LTS. I chose this distro because it is one that can be used with Windows AD and I eventually want to try connecting it to my windows server.
After flashing the USB drive, I booted to it and began setting up Ubuntu. To install on the external hard drive, I had to identify which drive it was. In this case, it was /dev/sdb. By selecting ‘-', this changed to free space. Then, selecting ‘+’ let me select Ext4 as the file system and '/’ as the mount point. I had no need to modify the size. I also made sure to select this device in the “Device for boot loader installation” option. Then I continued installation.
After successful installation, I am able to select Ubuntu or windows when I start my computer. The first thing I did on this was install VS Code and Git. Git was a little trickier, because my Github uses 2FA which is not compatible with the CLI. So I installed Github using the online documentation.
I used the command gh auth login which prompted me to login with the browser. I then connected Github to Git so I could continue using ‘Git’ commands and only use Github for authorization with gh auth setup-git. Then, to install and configure git, I used these commands:
sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
git config --list
Note: The email is the public Github email, not my private one. Because of my Github settings, if I try to use my private email to push to a repo, it will be denied because that would expose my email.