Skip to content

Instantly share code, notes, and snippets.

@ben8p
Last active October 22, 2023 13:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben8p/9fcc4a509b871f91b1596279cd38863e to your computer and use it in GitHub Desktop.
Save ben8p/9fcc4a509b871f91b1596279cd38863e to your computer and use it in GitHub Desktop.
What to do after installing linux

What to do after installing linux

Prevent freeze at boot

add nouveau.modeset=0 to to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
and run
sudo update-grub2

SSD optimizations

No Writes for Read Timestamps

add noatime to all partitions (in /etc/fstab)
Example:
UUID=587e0dc5 / ext4 noatime,errors=remount-ro 0 1

Minimizing writes from the OS and applications

Move tmp and log to RAM
add

# Uncomment these after all server based applications installed - eg. apache
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 
tmpfs /var/log/apt tmpfs defaults,noatime 0 0

to /etc/fstab

Turn off your swap

add vm.swappiness = 1 to /etc/sysctl.conf

Check whether the scheduler is properly set

It should either be:

  • deadline for SSD
  • none for nvme

Current scheduler can be checked using
cat /sys/block/sda/queue/scheduler
Replace sda by proper drive

The output should be:
noop [deadline] cfq
or
[none]

Something else ?
Then add elevator=deadline to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
and run
sudo update-grub2

Remove PCI errors from log

add pci=noaer to to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
and run
sudo update-grub2

PPA

Add needed PPA:

Applications

Settings

  • Configure touchpad for gesture and double tab
  • Install additional drivers
  • Apply theme and wallpapers
  • Increase inotify watches :
    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Gnome shell

Add extensions:

Bash

Add history-search-backward

echo '"\e[A": history-search-backward' > ~/.inputrc echo '"\e[B": history-search-forward' >> ~/.inputrc
echo 'set show-all-if-ambiguous on' >> ~/.inputrc echo 'set completion-ignore-case on' >> ~/.inputrc

Git

Run

  • git config credential.helper 'cache --timeout=86400'
  • git config --global user.name "John Doe"
  • git config --global user.email johndoe@example.com
  • git config --global merge.tool meld

VI

Fix keyboard arrows :
vim ~/.vimrc
add set nocompatible

VeraCrypt: No password for running it as root

sudo visudo
then add
<yourusername> ALL=NOPASSWD: /usr/bin/veracrypt
<yourusername> must be replaced by proper user name.

Citrix Receiver: configure extra certificate

By default, Citrix Receiver only trusts a few root CA certificates, which causes connections to many Citrix servers to fail with an SSL error. The ca-certificates package (already installed on most Ubuntu systems) provides additional CA certificates in /usr/share/ca-certificates/mozilla/ that can be conveniently added to Citrix Receiver to avoid these errors:

sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/
sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/

Chrome: limit the write actions

Click on the three dots (vertical line) in the upper right of the Chrome window - Settings.
Down below, click on Show advanced settings...
Section Privacy:
Remove the tick for: Use a prediction service to load pages more quickly

FAQ

Slow shutdown

Check which service is slow by pressing esc during shutdown.

Force service to shutdown

sudo systemctl edit cups-browsed.service
add

[Service]
TimeoutStopSec=5

Then sudo systemctl daemon-reload
and same with
sudo systemctl edit thermald.service

Slow boot ?

Investigate using
systemd-analyze blame and systemd-analyze time

Disable a service ?

sudo systemctl disable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment