Linux
Fixing display resolution stuck at 1024x768 in Ubuntu 18.04 due to missing NVIDIA driver
Open Terminal using Ctrl + Alt + T and update the system after OS installation
$ sudo apt update && sudo apt upgrade
Search for the appropriate driver of your graphic card and download it from NVIDIA's official website. My GTX 1660 Ti is compatible with version 418.43.
Change working directory to Downloads to activate the downloaded the driver file .run
$ cd Downloads/
$ chmod 777 <your .run file>
Then continue to configure the driver:
$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install build-essential libc6:i386
$ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$ sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
Update the kernel initramfs and reboot the system.
$ sudo update-initramfs -u
$ sudo reboot
According to Dibakar, we just disabled the current Nouveau kernel display server to install the NVIDIA driver. There are two possibilities that can happen at this step:
If after rebooting we do not see the purple screen of ubuntu, it is totally fine. Go ahead and login by trying Ctrl + Alt + F1 to F12 (Mine worked with F1), enter username and password. Then execute this comment:
$ sudo telinit 3
If after rebooting still we be able to login ubuntu normally, then open terminal and type in
$ sudo telinit 3
This will log out of the purple screen and bring us to a black screen. Then using Ctrl + Alt + F1 to log in with username and password.
Voila! it's time to install NVIDIA driver. Using the following commands
$ sudo su
$ bash .run
The installation will start and it will ask several questions:
Accept License (might not have this step).
The distribution-provide pre-install script failed! Are you sure you want to continue? -> CONTINUE INSTALLATION.
Install all NVIDIA 32-bit compatibility libraries? -> YES.
Would you like to run the nvidia-xconfig utility? -> YES.
Then reboot the computer and the display resolution should be automatically adjusted to 4k. In System Settings > Details, The graphic should change to 'GeForce GTX 1660 Ti/PCIe/SSE2', and in System Settings > Display, there should be various resolutions for to choose instead of just 1024 x 768 as before.
Reference: Fix Display Resolution on Ubuntu by Installing NVIDIA drivers
Autocomplete in Ubuntu terminal automatically adds "\" in front of "$": How to disable?
Link to askubuntu thread: https://askubuntu.com/questions/1494433/auto-completion-puts-back-slash-before-mark-how-can-i-disable-it-ubuntu-22
Check if direxpand is enable:
$> shopt direxpand
If it is off, enable it by:
$> shopt -s direxpand.
Doing this will expand the environmental variable after $ to the actual path and do not add an "\" in front of "$"
Extend Ubuntu disk size in Hyper-V
First, change the disk size in Hyper-V by following this: https://www.nakivo.com/blog/increase-disk-size-hyper-v-complete-guide/
Second, extend the partition size of the Ubuntu virtual machine by following this: https://www.nakivo.com/blog/increase-disk-size-hyper-v-complete-guide/