Linux: Difference between revisions

 
(4 intermediate revisions by the same user not shown)
Line 184: Line 184:


===Driver Installation===
===Driver Installation===
* Run <code>ubuntu-drivers list</code> to get a list of drivers
# Run <code>ubuntu-drivers list</code> to get a list of drivers
* Install the latest driver
# Install the latest driver
** E.g. <code>sudo apt install nvidia-driver-460</code>
#* E.g. <code>sudo apt install nvidia-driver-460</code>
* If you have secure boot enabled, you will be asked for a password during installation
# If you have secure boot enabled, you will be asked for a password during installation
** This is because the driver is a DKMS module.
#* This is because the driver is a DKMS module.
** After installation, reboot your computer and select "Enroll MOK" and enter that password in.
#* After installation, reboot your computer and select "Enroll MOK" and enter that password in.
** '''Note''' Failure to do this will result in the driver not working
#* '''Note''' Failure to do this will result in the driver not working
* Validate your installation by running <code>nvidia-smi</code>.
# Validate your installation by running <code>nvidia-smi</code>.
** <code>nvidia-smi</code> shows the latest cuda version supported by the driver, not necessarily the cuda version installed.
#* <code>nvidia-smi</code> shows the latest cuda version supported by the driver, not the cuda version installed.


===Cuda Installation===
===Cuda Installation===
Line 449: Line 449:
==Dual Booting==
==Dual Booting==
===Fix time difference between Windows===
===Fix time difference between Windows===
[http://ubuntuhandbook.org/index.php/2016/05/time-differences-ubuntu-1604-windows-10/ Reference]
By default, Windows stores the local time in the hardware clock while Ubuntu stores UTC time.
 
Set ubuntu to store UTC time:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
timedatectl set-local-rtc 1 --adjust-system-clock
timedatectl set-local-rtc 0 --adjust-system-clock
</syntaxhighlight>
</syntaxhighlight>
Set Windows to store UTC time:
https://wiki.archlinux.org/title/System_time#UTC_in_Microsoft_Windows


===Recover GRUB after installing Windows===
===Recover GRUB after installing Windows===
Line 792: Line 797:


==Network Troubleshooting==
==Network Troubleshooting==
On one of my OptiPlex5060 servers, the network adapter would reset on git ssh clones.<br>
On one of my OptiPlex 5060 servers, the network adapter would reset on git ssh clones.<br>
This would appear in <code>/var/log/syslog</code> as:
This would appear in <code>/var/log/syslog</code> as:
<pre>
<pre>
Line 875: Line 880:
* -S    handle sparse files efficiently
* -S    handle sparse files efficiently
* --numeric-ids    use id instead of uid/gid
* --numeric-ids    use id instead of uid/gid


To copy a root partition, make sure you change the following on the new drive:
To copy a root partition, make sure you change the following on the new drive:
Line 883: Line 887:
* Run [https://help.ubuntu.com/community/Boot-Repair boot-repair] from a live disk if you run into any issues.
* Run [https://help.ubuntu.com/community/Boot-Repair boot-repair] from a live disk if you run into any issues.
}}
}}
==Ubuntu==
Ubuntu-specific notes
===Disable ESM message===
[https://askubuntu.com/questions/1453749/inhibit-esm-messages-at-login Reference]
<syntaxhighlight lang="bash">
# Disable MOTD
sudo chmod -x /etc/update-motd.d/88-esm-announce
sudo chmod -x /etc/update-motd.d/91-contract-ua-esm-status
# Disable APT check
sudo sed -Ezi.orig \
  -e 's/(def _output_esm_service_status.outstream, have_esm_service, service_type.:\n)/\1    return\n/' \
  -e 's/(def _output_esm_package_alert.*?\n.*?\n.:\n)/\1    return\n/' \
  /usr/lib/update-notifier/apt_check.py
sudo /usr/lib/update-notifier/update-motd-updates-available --force
</syntaxhighlight>