sudo apt update
sudo apt install -y curl git
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
cat << EOF >> ~/.bashrc
# ASDF
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM yourimage | |
# Setup the user | |
ENV USER_NAME=yourusername | |
ENV GROUP_NAME=yourusergroup # can be the same as USER_NAME | |
ENV HOME=/var/home/$USER_NAME | |
# Create the home directory for the new user. | |
RUN mkdir -p $HOME |
How to install an unlicensed copy of windows using virtualbox
- Install virtualbox 7 (or higher)
- Ubuntu 22.04 jammy for linux mint 21
- Download extensions pack for the same version.
- Virtualbox > Tools > Install Oracle VM Virtualbox Extensions Pack for the same version
- Download Windows 10 pro from Microsoft
- Create a machine
- System > Motherboard > Check EFI and Secure boot (boot order won’t work with EFI, required for windows 11)
- System > Motherboard > Check TPM 2.0 (Security chip emulation)
- Check latest version: https://github.com/shiftkey/desktop
- Download: https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb
- Run downloaded file
Linux Mint 21 vanessa corresponds to Ubuntu jammy
Install docker engine (can be skipped because it's bundled with docker desktop)
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Windows 10 guest virtual machine on linux mint 21 host using KVM and QEMU
Host OS: Linux mint 21 amd64
Guest OS: Windows 10 pro amd64 with "TPM 2.0" and "Secure Boot"
- Enable virtualization (e.g. VT-x / AMD-V) in your BIOS / UEFI settings.
- Download: https://www.microsoft.com/en-us/software-download/windows10ISO
- Download: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
- Install KVM dependencies
Change the journal mode to data=journal
sudo tune2fs -o journal_data /dev/sda1
Source:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG JRE_URL=http://javadl.oracle.com/webapps/download/AutoDL?BundleId=247127_10e8cce67c7843478f41411b7003171c | |
ARG JAVA_HOME_NAME=java-8-oracle | |
RUN \ | |
apt-get update && \ | |
apt-get install -y wget && \ | |
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" $JRE_URL -O java-linux-x64.tar.gz && \ | |
mkdir -p /usr/lib/jvm/$JAVA_HOME_NAME && \ | |
tar -C /usr/lib/jvm/$JAVA_HOME_NAME --strip-components=1 -xvf java-linux-x64.tar.gz && \ | |
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/$JAVA_HOME_NAME/bin/java" 1 && \ | |
rm -rf /var/lib/apt/lists/* && \ |
I got annoyed having to git add then git commit -a -m and then git push most of the time, so here's a shortcut.
Having to remove the quotes and re-add them was also annoying.
Add to /home/yourname/.bashrc
# add files, commit "my message" and push
function save {
git add .
git commit -a -m "$*"