Configure Ubuntu system installed in UEFI mode and SSD

Upate and Upgrade system
sudo apt update && sudo apt dist-upgrade -y

Check grub
sudo update-grub

Identifying if Linuxmint has been installed in UEFI mode
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"

Check current kernel
uname -a
dpkg --list | grep linux-image

cat /etc/*release
cat /etc/*version

sudo apt install htop
type “htop” in terminal to start
type “q” to exit

free -m

sudo parted /dev/sda
select /dev/sdb to navigate multiple disk set up
type “print” this shows current partition scheme
type “q” to exit

dmesg | more
dmesg | grep Memory
dmesg | grep eth
dmesg -c (clears the buffer for next reboot)

Hardware and System
sudo lshw
sudo lshw | head
sudo lshw -short
sudo lshw -businfo
sudo lshw -class address
sudo lshw -class bridge
sudo lshw -class bus
sudo lshw -class communication
sudo lshw -class disk
sudo lshw -class display
sudo lshw -class generic
sudo lshw -class input
sudo lshw -class memory
sudo lshw -class multimedia
sudo lshw -class network
sudo lshw -class power
sudo lshw -class printer
sudo lshw -class processor
sudo lshw -class storage
sudo lshw -class system
sudo lshw -class tape
sudo lshw -class volume

inxi codes
sudo apt install inxi

inxi -F          
inxi -Fxz        
inxi -c 5        
inxi -c 5 -b    
inxi -p           
inxi -r           
inxi -AG       
inxi -ni       

efi grub
sudo su
cd /boot/efi/EFI
output of bootloader: i.e microsoft debian ubuntu

rm -rf microsoft or linux distro to remove an obsolete entry

efibootmgr shows current default boot i.e should be ‘0000’
sudo efibootmgr (basic info)
sudo efibootmgr -v (bootloader output)
sudo efibootmgr -V (version in use)
sudo efibootmgr -b xxxx -B (replace x’s to remove an obsolete entry)

Check whether the scheduler is set to deadline
cat /sys/block/sda/queue/scheduler
The output should be: noop [deadline] cfq
If deadline is not listed, edit grub file

sudo nano /etc/default/grub
locate this line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
add elevator=deadline
GRUB_CMDLINE_LINUX_DEFAULT="elevator=deadline quiet splash"

Save file, update-grub and reboot

Disable the write action "access time stamp"
sudo nano /etc/fstab
add “noatime” to /, /var and /home partitions: But not swap or the /boot/efi
example below:

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d / ext4 noatime,errors=remount-ro 0 1
Save file, update-grub and reboot

Manual trim
sudo fstrim -v /
sudo fstrim -v /home

Reduce Swappiness and cache pressure (share same file)
cat /proc/sys/vm/swappiness
normally set at ‘60’, ideal for a server, not desktop

sudo nano /etc/sysctl.conf
scroll to bottom of file and add

cat /proc/sys/vm/vfs_cache_pressure
normally set at 100

sudo nano /etc/sysctl.conf
scroll to bottom of file and add

Save file, update-grub and reboot

Clear thumbnail cache
rm -v -f ~/.cache/thumbnails//.png ~/.thumbnails//.png
rm -v -f ~/.cache/thumbnails///.png ~/.thumbnails///.png

apt install dconf-editor
click on org > Gnome > desktop > thumbnail-cache
click on maximum-age and set it to 30 days
click once on maximum-size and set it to 50Mb

Clear Recent Files
cat /dev/null > .local/share/recently-used.xbel

Check boot up time
systemd-analyze time
systemd-analyze blame
systemd-analyze critical-chain

Disable network service
sudo systemctl disable NetworkManager-wait-online.service (if it retards boot up time)

Check file and filesystem
sudo apt autoclean && sudo apt autoremove
sudo dpkg --configure -a
sudo apt clean

sudo dpkg -l | grep ^..r
sudo apt install -f

ls -ld /var/log/installer
ls -ld /lost+found

If English GB language default in Libre Office is missing
sudo apt install libreoffice-l10n-en-gb hunspell-dictionary-en-gb hyphen-en-gb libreoffice-grammarcheck-en-gb libreoffice-help-en-gb

Go to synaptic and type libreoffice in search panel and add galaxy, tango, oxygen icons and any english (GB) dictionary, help, grammar etc

Install Numix Circle icons
install Numix theme and icons from synaptic, then open terminal
sudo apt install git
git clone
cd numix-icon-theme-circle
sudo mv Numix-Circle /usr/share/icons
sudo mv Numix-Circle-Light /usr/share/icons

Torrent Error message: Unable to save resume file. Too many open files.

Check and edit the /etc/sysctl.conf file save with sysctl -p
cat /proc/sys/fs/file-max
nano /etc/sysctl.conf file
edit the /etc/sysctl.conf file
sysctl -p to save

Usefull sites