Customize Linux Mint
Tags: linux
Apply personal settings. Install useful applications. Make Linux Mint run faster.
System Settings
Open the Settings app and change below options:
-
Effects
- Animation:
OFF
- Animation:
-
Accessibility
- Large text:
ON
- Large text:
-
Date and Time
- Region:
Asia
, City:Ho Chi Minh
- First day of week:
Monday
- Region:
-
Desktop
- Desktop Icons: All icons are
ON
- Desktop Icons: All icons are
-
General
Disable compositing for full-screen windows:ON
-
Notifications
- Remove notification after their timeout:
ON
- Remove notification after their timeout:
-
Preferred applications
- Removable media
- Prompt of start program on media insertion:
OFF
- Prompt of start program on media insertion:
- Removable media
-
Privacy
Remember recently accessed files:OFF
-
Screen saver
- Customize
- General: All items are
OFF
- General: All items are
- Customize
-
Startup Apps
- Mint Welcome:
OFF
- Print Queue:
OFF
- System Reports:
OFF
- Update Manager:
OFF
- Mint Welcome:
-
Window Titling
- Maximize, instead of tile, when dragging a window to the top edge:
ON
- Maximize, instead of tile, when dragging a window to the top edge:
-
Bluetooth:
- Device:
OFF
- Device:
-
Display
- Refresh rate:
60 Hz
for the main monitor - Refresh rate:
30 Hz
for the plugged-in monitor
- Refresh rate:
-
Power Manager
- Turn off screen when inactive for:
5 mins
- Suspend when inactive for:
30 mins
(on Battery) - Brightness when inactive:
5%
- Dim screen after inactive for:
30 secs
- Turn off screen when inactive for:
-
Sound
- Output:
Muted
(when no Headset) - Input:
Muted
(when no Headset)
- Output:
-
Users and Groups
- Groups: add to
dailout
,plugdev
,tty
- Groups: add to
System Tweaks
For better performance and daily convenient.
Filesystem Table
Apply options: No Access Timestamp, Delayed Disk Commit, Temporary File System:
sudo nano /etc/fstab
UUID=xxxx / ext4 errors=remount-ro,noatime,commit=600 0 1UUID=xxxx /boot/efi vfat umask=0077 0 1tmpfs /tmp tmpfs noatime 0 0/swapfile none swap sw 0 0
System Control
Keep cache in memory, and delay disk write:
sudo nano /etc/sysctl.conf
vm.swappiness = 1vm.vfs_cache_pressure = 10vm.dirty_writeback_centisecs = 60000
Start-up
Do not wait for network connection:
sudo systemctl disable NetworkManager-wait-online.service
APT
No need to download translation:
sudo nano /etc/apt/apt.conf.d/00aptitude
Acquire::Languages "none";
SSD TRIM
Run TRIM daily:
sudo mkdir -pv /etc/systemd/system/fstrim.timer.d
sudo nano /etc/systemd/system/fstrim.timer.d/override.conf
[Timer]OnCalendar=OnCalendar=daily
Performance mode
Get current mode:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Set Performance mode:
sudo echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Permanent set:
case $governors in *performance*) GOVERNOR="performance" break ;;
sudo echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
NTFS3
Linux Mint 22 comes with Kernel 6.8 which is known with NTFS issue. To fix it, disable NTFS3 module:
echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf
Restart, then open Disk → Repair Filesystem.
NTFS Disks will be mounted using fuseblk
type.
Scripts
In $HOME, add below scripts:
#!/usr/bin/bash
sudo echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
#!/usr/bin/bash
sudo syncsudo bash -c "echo 1 > /proc/sys/vm/drop_caches"
#!/usr/bin/bash
while [ true ]; doxdotool mousemove_relative --sync -- 0 50sleep 10sxdotool mousemove_relative --sync -- 0 -50sleep 10sdone
#!/usr/bin/bash
sudo rm /root/.local/share/recently-used.xbelsudo rm ~/.local/share/recently-used.xbel
Software Sources
- Mirrors:
Fastest
- Main (wilma): https://mirrors.cicku.me/linuxmint/packages
- Base (noble): http://mirror.bizflycloud.vn/ubuntu
System Packages
- Multimedia Codecs:
mint-meta-codecs
- Nvidia GPU:
nvidia-driver-550
(550.120-0ubuntu0.24.04.1)
Applications
Add feature, tools, and applications.
Packages
Build tools:
sudo apt install wget curl git build-essential make cmake gawk
git config --global user.name "vuquangtrong"git config --global user.email "vuquangtrong@gmail.com"
Python:
sudo apt install python3-dev python3-pip python3-setuptools python3-wheel python3-venv
Utilities:
sudo apt install nvtop htop
sudo apt install tmuxecho "set -g mouse on" > ~/.tmux.conf
sudo apt install fonts-firacode
Some packages or applications depend on old libncurses5
, but it is not available on new linux releases, so download below packages and install them manually:
wget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.4-2_amd64.deb && sudo dpkg -i libtinfo5_6.4-2_amd64.debwget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.4-2_amd64.deb && sudo dpkg -i libncurses5_6.4-2_amd64.deb
Terminal
Change General options:
- Show menu bar:
No
- Enable mnemonics:
No
- Enable F10:
No
- Background color:
#121212
Starship
Informative shell prompt:
cd ~sudo apt install curlcurl -sS https://starship.rs/install.sh | shecho '[ "$STARSHIP_DISABLE" = "true" ] || eval "$(starship init bash)"' >> ~/.bashrcstarship preset plain-text-symbols -o ~/.config/starship.toml
To temporary disable Starship:
STARSHIP_DISABLE=true bash
Ble.sh
Bash line autocompletion:
cd ~sudo apt install git make gawkgit clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.gitmake -C ble.sh install PREFIX=~/.localecho 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc
Configuration:
ble-face -s command_builtin_dot bold,fg=redble-face -s command_builtin bold,fg=redble-face -s command_alias bold,fg=tealble-face -s command_function bold,fg=99 # bold,fg=133ble-face -s command_file bold,fg=greenble-face -s command_keyword bold,fg=blueble-face -s command_jobs bold,fg=redble-face -s command_directory bold,fg=63ble-face -s command_suffix bold,fg=231,bg=28ble-face -s command_suffix_new bold,fg=231,bg=124
XDoTool
Manipulate Mouse and Keys:
sudo apt install xdotool
Tree
Show the tree of a directory:
sudo apt install tree
IBus Input Method Engine
IME for Vietnamese:
sudo apt install ibus ibus-unikey
IBus Preference:
- Keyboard shortcut:
Ctrl
+Shift
+Space
- Options:
- Embed pre-edit text in application window:
Unchecked
(Zalo Web is incompatible with embedded text input)
- Embed pre-edit text in application window:
Nemo
File Explorer.
-
Bookmarks:
/tmp
/home/trongvq/workspace
-
Actions in
.local/share/nemo/actions
:mdx.nemo_action [Nemo Action]Name=Open in Text EditorComment=Open in Text EditorExec=xed %FIcon-Name=text-editorSelection=mdxExtensions=mdx;vscode.nemo_action [Nemo Action]Name=Open in VS CodeComment=Open in VS CodeExec=code %FIcon-Name=visual-studio-codeSelection=AnyExtensions=dir;
Themes
Remove some heavy themes:
sudo apt remove papirus-icon-themesudo apt remove yaru-theme-icon
Firefox
-
Goto about:config, then:
- Disable Session Store:
- change
browser.sessionstore.interval
to1800000
- change
browser.sessionstore.interval.idle
to1800000
- change
- Move Network cache to RAM:
- change
browser.cache.memory.enable
totrue
- change
browser.cache.memory.capacity
to1048576
(for 1 GB) - change
browser.cache.memory.max_entry_size
to1048576
( for 1 KB)
- change
- Others:
- change
browser.urlbar.suggest.trending
tofalse
- change
browser.search.region
toUS
- change
- Disable Session Store:
-
Goto about:preferences, then:
- Privacy:
- DNS over HTTPS:
Max Protection
- DNS over HTTPS:
- Google search language:
English
- Privacy:
-
Extensions:
- uBlock Origin
- Allow in Private mode
- uBlock Origin
Visual Studio Code
Download and install .deb
file:
sudo dpkg -i code_*_amd64.deb
Sync with GitHub account.
-
Settings:
~/.config/Code/User/settings.json {"security.workspace.trust.enabled": false,"window.restoreWindows": "none","workbench.startupEditor": "none","editor.minimap.enabled": false,"editor.minimap.autohide": true,"editor.mouseWheelZoom": true,"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace","editor.fontLigatures": true,"editor.rulers": [80,],"editor.tabSize": 4,"diffEditor.ignoreTrimWhitespace": false,"files.associations": {"*.mdx": "markdown"},"files.trimTrailingWhitespace": true,"diffEditor.hideUnchangedRegions.enabled": true,"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }","hediet.vscode-drawio.simpleLabels": true,"hediet.vscode-drawio.theme": "Kennedy",} -
Key bindings:
~/.config/Code/User/keybindings.json [{"key": "ctrl+j","command": "-workbench.action.togglePanel"},{"key": "ctrl+k 1","command": "editor.action.insertSnippet"}] -
Snippets:
~/.config/Code/User/snippets/markdown.json {"bash command" : {"prefix": "bash","body": ["``` bash frame=\"none\"","$0","```"]}} -
Tips:
-
Quickly remove all extensions:
code --list-extensions | while read extension;docode --uninstall-extension $extension --forcedoneor
code --list-extensions | xargs -L 1 code --uninstall-extension
-
ImHex
A HEX editor with structural parser:
sudo apt install libglfw3 libmbedtls14t64 libmbedx509-1t64sudo dpkg -i imhex-*-x86_64.deb
ImHex Options:
- constantly 60 fps refresh rate → change to
15
fps - Change Font to
DejaVu Sans Mono
, Size to20
Serial Terminal
To work with Serial ports:
Minicom
Small but having enough features:
sudo apt install minicom
Tio
More cool features:
Download source code:
sudo apt install meson libglib2.0-dev liblua5.2-devgit https://github.com/tio/tiocd tio
Compile and install:
meson setup buildmeson compile -C buildmeson install -C build
Meld
Directory and File Comparison
sudo apt install meld
Image Tools
Install imagemagick
package:
sudo apt install imagemagick
Trim blank border with -fuzz
option:
for f in *.png; do convert $f -fuzz 10% -trim ${f%.*}.png; done
Resize image, prefer width and keep ratio:
convert <input> -resize <width>x<height> <output>
Install webp
package which contain dwebp
and cwebp
tool:
sudo apt install webp
Convert all png to webp:
for f in *.png; do cwebp -q 85 -mt $f -o ${f%.*}.webp; done
Convert all webp to png:
for f in *.webp; do dwebp $f -o ${f%.*}.png; done
System Backup
Backup system to image for later restore.
Prepare
Clean up unused packages and cache:
sudo apt autoremovesudo apt autocleansudo apt autopurgesudo apt clean
Clean VS Code’s cache:
sudo rm -rf /home/trongvq/.config/Code/Cache*/
Timeshift
Options:
- RSYNC
- Weekly
- Include/Exclude:
"/etc/timeshift/timeshift.json "exclude" : ["/var/lib/apt/lists","/var/log/journal","/home/*/.platformio/.cache","/home/*/.nvm/.cache","/home/*/.npm","/home/*/.mozilla/firefox/Crash Reports","/home/*/.config/Code/Cache","/home/*/.config/Code/CachedData","/home/*/.config/Code/CachedExtensionVSIXs","/home/*/.config/Code/Crashpad","/home/*/.config/Code/logs","/home/*/.bash_history","/home/*/.xsession-errors","/home/*/.xsession-errors.old","+ /home/trongvq/.**","/root/.bash_history","/root/**"],
Advanced Tweaks
Add User to Sudoers
Add current user to sudoers
group, and do not ask for password:
sudo bash -c "echo '$USER ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/$USER"
Use Compressed Swap
The kernel feature called zswap provides a compressed RAM cache for swap pages. By default, zswap is switched off, and if enabled, it uses up to 20 percent of the RAM memory.
Turning on zswap causes CPU to take effort to compress/ decompress the data blocks, and a chunk of RAM is sacrificed for compressed data.
To turn on zswap, follow the below steps:
-
Include
z3fold
toinitramfs
:/etc/initramfs-tools/modules z3fold -
Add
zswap
params toGRUB_CMDLINE_LINUX_DEFAULT
in/etc/default/grub
:/etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=lz4" -
Update GRUB:
sudo update-grub -
Update InitRamFs:
sudo update-initramfs -u
Disable WiFi Power Management
A way to speed up wireless internet connection by disabling power management for the WiFi chipset.
Run iwconfig
to see if Power Management is on
.
Then change the wifi.powersave
value to 2
(off).
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]wifi.powersave = 2
Speed up Intel Wireless chipset
Modern Intel wireless chipset runs on the iwlwifi driver.
By turning on Tx AMPDU
, transmission speed is increased.
Run lsmod | grep iwlwifi
to see if iwlwifi is actually in use.
Then change the setting for 11n_disable
value to 8
(it is bitmap options, not totally disabling 11n):
echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-speed.conf
Disable Journal feature of Disk
A journaling file system is a file system that keeps track of changes not yet committed to the file system. In the event of a system crash or power failure, such file systems can be brought back online more quickly with a lower likelihood of becoming corrupted.
Only disable journal feature on a separated disk which contains only build source code and data.
The commit
option of mount points in /etc/fstab
will not work when journal feature is disabled.
To disable journal feature:
-
Boot into Recovery Mode from GRUB menu
-
Access to
root
command line session. -
Trigger the emergency event, make system partition is re-mounted as Ready-Only:
echo "u" > /proc/sysrq-trigger -
Turn off the journal feature on the target disk:
tune2fs -O ^has_journal /dev/<partition> -
Verify the change:
debugfs -R features /dev/<partition>
If working on a data storage, do not need to go to Recovery mode.
Just unmount the disk and use above tools with sudo
.
Turn Off CPU Mitigation
Patching CPU vulnerabilities had the side effect of a huge performance impact.
These CPU mitigations are enabled by default on all Linux distributions.
Run lscpu
to see details.
This Linux parameter allows booting the system with software-controlled CPU security mitigations by adding mitigations=off
to the option GRUB_CMDLINE_LINUX
in /etc/default/grub
.