• Stars
    star
    352
  • Rank 120,622 (Top 3 %)
  • Language
    CSS
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Webpage with tips, tricks and guides for Linux. (with Algolia Search)

howtolinux

This is an extensive guide on the set of things I use.

Index

Installation

Post Installation

Preferred Apps

Important Tweaks

Optimize Boot-time & Ram Usage

Miscellaneous

1. Installation

Only for Advanced Users
Go through this, because this can be a very helpful step. I am currently using brtfs & find it better. Also, don't remove the Recovery partition to be on the safe side, it helps out a lot.

Partitions to Create

  • 500 MB for Efi boot (Enough even for multi-boot)
  • Recovery (Very Useful, only Pop Os for Ubuntu you need to manually backup)
  • Swap partition (First, read What about Swap?)
  • (Before selecting read about Brtfs & Zfs) Remaining for Ext4/Brtfs/Zfs System

What about Swap?

If you are on a newer Ubuntu-based system that uses Ubiquity installer it will automatically create a Swap File any time Ext4 is used for root.
There are two ways of getting swap (You can choose which is better)

  • General Method - Creating a swap partition (Linux-swap), Now to do this you need to understand the importance of swap, if you have a low RAM device you need a huger swap like if you have 2GB ram you should get 4 to 6 GB of swap & optimise your swap ratio to a higher value. So, if you have a higher ram you need a lower swap. So, according to my numbers for a ram: swap should be as follows, 2 & lower:6, 4:6, 8:4, 16 & above:2. Also, you have to adjust the swappiness property (given below).

[BRTFS] - Snapshots don't work on Brtfs if we create a swap file in that partition. So Brtfs users should either stick with the general method or create a swap file in a different partition.

  • Swap File - It is a relatively new concept. In this, you create a swap file post-installation. You don't need to dedicate some fixed amount of memory to it as it does on Linux-swap that is why it is also space-efficient. And the best part is you can resize this or remove this whenever you want to.

Post Installation Steps:

Brtfs [Snapshots won't work]
Go here

Ext4

  1. Instruction set for the Swap file
sudo dd if=/dev/zero of=/swapfile bs=1G count=4 status=progress

Count 4 means 4 sets of 1 GB, i.e. 4GB. 2. Change permissions and Make swap

sudo chmod 600 /swapfile && sudo mkswap /swapfile
  1. Turn the Swap on
sudo swapon /swapfile
  1. Add this line
/swapfile none swap defaults 0 0

to the end of

sudo nano /etc/fstab
  1. Reboot

What about ZRAM?

First, you should know what ZRAM is. ZRAM creates a block device in RAM, where pages would otherwise be written to swap before it is compressed, then stored. Allowing for a much faster I/O and, the data compression provides a lot of memory savings. The downside of ZRAM is the usage of CPU for compression but this is usually balanced by the gains from avoiding swap and with overall memory savings of compression.
This is very useful on my PC with 4GB ram and a 3.4GHz CPU.

Q. How to enable ZRAM?

  1. Install zram-config
sudo apt install zram-config -y 
  1. To check
cat /proc/swaps

Should look like this

zram
3. If it doesn't show up, try rebooting.

Q. Should I Encrypt?

Encryption adds a layer to the disk, so there's a performance penalty. In day to day operations, you wouldn't notice it though, but there's an argument that older hardware might suffer if they're already in the limit. But it's usually a very useful feature to have, you never know what will happen to your hardware, if it's lost or stolen, you don't want to think about people having access to your stuff as well.

Q. Should I use Btrfs or Ext4 or XFS?

Ans. It depends, As Btrfs is in its infancy state also Ext4 is a more popular option. But, Btrfs is starting to become a trend since Fedora adopted it & it ships with Fedora 33. Also, I am using this on both of my systems. If you are on HDD then go for Btrfs because it is surprisingly fast on it but, if you are on a SSD you can go for XFS. But, remember if you go for XFS it is not resizable unless you are on a lvm.

To fix installation bugs

sudo apt install btrfs-progs -y

Q. What about ZFS?

Ans. ZFS has been added as an experimental new filesystem on 19.10. If you want to learn more about referring to this article. If it meets your requirements you can try it. Lately, it is becoming a trend. As, it is very stable and used by leading companies such as Oracle. You can check out why people are switching to ZFS.

If you want to learn how to, go here.

2. Post Installation

There are some basic things you need to do after installation.

Update your System

Get the latest updates via terminal or some GUI based updater or Apps stores(like Pop shop).
Find GUI based updater
update
For Terminal use

sudo apt update && sudo apt upgrade -y && flatpak update

For Forced update

sudo apt install -f && sudo apt dist-upgrade

Why use apt, not apt-get?

Ans. Apt was made according to an end-user perspective. It mostly does everything apt-get does. So for normal users, apt-get is not useful. But, for a developer that writes scripts and does automation, like writing a Docker file to build images, they would prefer apt-get over apt.

Difference b/w upgrade and dist-upgrade

When you run the apt upgrade, it only updates that which has a new release accessible to the platform, as defined in /etc/apt/sources.list or in /etc/apt/sources.list.d/.

However, when you run apt dist-upgrade, it will intelligently install or remove packages as needed, to complete the upgrade. Dist-upgrade has an intelligent dispute determination method, so it will attempt to update the numerous necessary packages at the cost of those considered less valuable. But, this might be dangerous because it removes files that might eventually break the system.

Updating your recovery (Pop Os)

If you upgrade to a newer release the recovery also needs to be upgraded, you can do it via Terminal.

pop-upgrade recovery upgrade from-release

Software Properties Common

This is a required library for apps, that use PPA's for installation. It doesn't come pre-installed with many Ubuntu-based distros like Elementary OS.

sudo apt install software-properties-common -y

Proprietary Drivers

You can get proprietary drivers directly from the Pop/Ubuntu Shop or Terminal.
If you get issues with NVIDIA get the NVIDIA iso.

Gnome Tweaks & the ones I use

sudo apt install gnome-tweaks -y

1. Minimize Button and Button Placement

Minimize is an important button. While I think you can live without it if you use the Super key a lot. But, for me, the minimize button seems to be very useful.
You can get the maximize button too, but it's not that useful because it can be done by double-clicking the title bar.
If you were a mac user, you might prefer left button placement over the default right placement.
Note: Left Placement glitches the gnome-tweak-tool for some reason don't worry about it just increase the size of the window.

gnome-minimise

2. Battery Percentage

Shows the amount of battery remaining in percent. Doesn't work for desktop pc.

batterypercent

3. Optimizing Font

I use custom resolution on my PC's so the font seems small to me, so it makes it better I use 1.11x font. I have set the hinting to full because hinting makes the font appear crisper so that they are more readable. Also, I have set the anti-aliasing to full pixels instead of sub-pixels because it has more font smoothing.

custom-font-size

4. Activity Hot Corner and Format time

The activity hot corner enables the hot corner where the button Activity is placed. So rather than clicking the button just touch the edge.
You can format time according to what you need. I only use the time, so I got rid of the date there.

overlay

Custom Resolution with Xrandr

Please read all the problems & bugs with this, so that you know what problems might come & how to fix them
If your display supports a higher refresh rate, go for it because higher refresh rate displays make the moving content look and feel smoother and snappier.

set-of-refreshrates

Steps:

1. Check xrandr
You can know the name of your display here generally it is eDP-1 if is hybrid it can be eDP-1-1

xrandr #Check your display name

xrandr

2. Find resolution which will fit
My original maximum resolution is 1600 900, which is a 16:9 aspect ratio. So if I choose a different aspect ratio, then some parts of my display will blackout.

So, I can go for 1920x1080 or 1792x1008
To find out which fits you best you can do tests by adding different resolutions

3. How to add?

- cvt
cvt 1920 1080 #Your custom resolution

cvt

- xrandr --newmode

Copy line after modline

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

newmode

- xrandr --addmode

Add the resolution with display name

xrandr --addmode eDP-1 "1920x1080_60.00"

addmode

[Problem] The resolution goes away after a reboot.

Ans. Add all the final lines to .profile so every time a session starts, the code runs, the custom resolution gets added.

nano ~/.profile

profile

[Problem] What about other refresh rates?

Ans. You have to experiment with cvt a bit, to find which refresh rates should need. My refresh rate is from 60hz to 120hz. I did some experimentation and added these refresh rates.

Like if your display supports 120 hertz

cvt 1920 1080 120

custom120

Finally, I added these resolutions

xrandr --newmode "1920x1080_120.00"  369.50  1920 2080 2288 2656  1080 1083 1088 1160 -hsync +vsync
xrandr --addmode eDP-1 "1920x1080_120.00"
xrandr --newmode "1920x1080_119.91"  369.25  1920 2080 2288 2656  1080 1083 1088 1160 -hsync +vsync
xrandr --addmode eDP-1 "1920x1080_119.91"
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode eDP-1 "1920x1080_60.00"
xrandr --newmode "1920x1080_59.89"  172.75  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode eDP-1 "1920x1080_59.89"

Now it should look like this

custom-resolution-final

[Problem] How to get rid of custom resolution?

Ans. Simple if you have added custom resolution to your .profile, open it again, remove those lines, and reboot.

[BUG] Problems regarding Hybrid Graphics Switching.

Ans. If you have a Hybrid or Multiple Graphics Card, your display name will change if you switch graphics. So, you have to change the xrandr --addmode if you switch Graphics.

3. Preferred Apps

Pop has apps that you need. But, if you do not like them, you can also get alternatives.

Snap Vs Flatpak (Package Managers except apt, dpkg)

Snap can incorporate more apps than Flatpak. It runs how the developer wants it to. Some even say go as far as to say, "Snap is the future". But, currently, Flatpak outperforms Snap, for the most part, that is why I don't prefer Snap but, still, it's your choice.

If you are a newbie I won't recommend you remove snap.

Reference to Removing Snap
Reference to Detailed Guide on Flatpak

Browser

Today Chrome is the most popular browser in the world. Also, I have been using Chrome since probably 2012.

MENTION OPENSOURCE - Chrome is not an open-source browser, Vivaldi & Opera are partly open-source, and also these browsers do not support VAAPI

**Firefox, Brave & TOR are open-source browsers. Meaning these are better alternatives if you are looking for privacy. But, TOR doesn't support VAAPI. **

To learn more about VAAPI go here.

Chromium Based Browsers

1. Chrome

sudo apt install google-chrome-stable -y

2. Vivaldi

wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo apt-key add -
sudo add-apt-repository 'deb https://repo.vivaldi.com/archive/deb/ stable main'
sudo apt update && sudo apt install vivaldi-stable -y

3. Brave

sudo apt install apt-transport-https -y
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update && sudo apt install brave-browser -y

4. Opera

sudo add-apt-repository 'deb https://deb.opera.com/opera-stable/ stable non-free'
wget -qO - https://deb.opera.com/archive.key | sudo apt-key add -
sudo apt update && sudo apt install opera-stable -y

Non-Chromium Based

1. Firefox

Comes pre-installed with Pop & Ubuntu.

2. TOR

sudo apt install torbrowser-launcher -y

In case of driver/library error which bugs on Chromium-based browsers, Non-Chromium-based browsers can help you out.

To remove Firefox (Not Recommended)

sudo apt-get autoremove --purge firefox* -y

Extensions

Generally, these extensions exist for almost all browsers.

1. Privacy Add-ons

  • uBlock Origin Chrome Firefox - uBlock Origin is not an "ad blocker", it's a wide-spectrum content blocker with CPU and memory efficiency as a primary feature.
  • HTTPS Everywhere Chrome Firefox - HTTPS Everywhere is an extension created by EFF and the Tor Project which automatically switches thousands of sites from insecure "http" to secure "https".
  • ClearURLs Chrome Firefox - Removes tracking elements from URLs.
  • Decentraleyes Chrome Firefox - Protects you against tracking through "free", centralized, content delivery. It prevents a lot of requests from reaching networks like Google Hosted Libraries, and serves local files to keep sites from breaking. Complements regular content blockers.
  • Privacy Badger Chrome Firefox - Privacy Badger automatically learns to block invisible trackers.
  • User-Agent Switcher & Manager Chrome Firefox - Spoof websites trying to gather information about your web navigation to deliver distinct content you may not want
  • CanvasBlocker Firefox - Alters some JS APIs to prevent fingerprinting. (Chrome Unsupported)
Might break some sites! (Ex. GitHub)
  • NoScript Chrome Firefox - Allow potentially malicious web content to run only from sites you trust. Protect yourself against XSS other web security exploits.

2. Useful Tools

  • Absolute Enable Chrome Firefox - Force Enable Right Click & Copy on disabled websites.

3. Productivity Tools

  • LanguageTool Chrome Firefox - Check your texts for spelling and grammar problems everywhere on the web.

4. Desktop specific

  • GNOME Shell integration Chrome Firefox - This extension provides integration with GNOME Shell and the corresponding extensions repository, make it easy to add extensions via your browser.

Email Client

Chrome is good enough for me. Pop OS ships with Geary which is a great email client for any user.

If you want to remove Geary

sudo apt-get autoremove --purge geary* -y

Alternatives,

1. Evolution

sudo apt install evolution -y

2. Thunderbird

sudo apt install thunderbird -y

3. MailSpring

Get the deb file and try installing it.
If it throws gvfs dependency error. Follow these Steps:

  1. Install these libraries
sudo apt install libsecret-1-dev gconf2 python2 python-is-python2 -y
  1. Install the deb,
sudo dpkg --ignore-depends=gvfs-bin -i mailspring*.deb

Video Tools

1. VLC

VLC is the best video player for any platform

sudo apt install vlc  -y

Get rid of the stock video player

sudo apt-get autoremove --purge totem* -y

2. OBS Studio

OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently.

sudo apt install obs-studio -y

3. Peek

Peek is an recorder with with video recording, GIF recording and screenshot capabilities.
Pop users don't need to add this repo.

sudo add-apt-repository ppa:peek-developers/stable && sudo apt update
sudo apt install peek -y

Audio Tools

1. PulseAudio Controls

PulseAudio is an audio server. The audio in your apps passes through Pulse. So in that way, you can use several methods to handle these sounds ere you can hear them. It also optimizes the quality of your audio.

sudo apt install pavucontrol -y

To learn how to control your audio, go here.

2. PulseEffects

Audio effects for Pulseaudio applications. This helps add specialized effects for each application individually and thus creates multiple profiles for different applications.

sudo apt install pulseeffects -y

This might add a lot of desktop icons.

3. Audacity

Audacity is open-source software, easy-to-use, multi-track audio editor, and allows users to record audio and edit music clips.

flatpak install org.audacityteam.Audacity -y

4. Ardour

Ardour is a recorder and digital audio workstation app. It's made to be suitable for professional use.

sudo apt install ardour -y

Office

I directly use Chrome extension for the office, which you can get here

If you have not tried LibreOffice, I will recommend you to try it first.
Alternatives,

1. Free Office

Looks like Microsoft Office 2016.
Get the deb file here

2. OnlyOffice

Looks like Microsoft Office 2013.
Get the deb file here

3. WPS Office

If you have a problem with Chinese apps or are privacy concerns skip over this.

This is a beautiful office suite with lots of customization.
Get the deb file here

You can also use web-based offices like Google Drive.

To remove LibreOffice
sudo apt-get autoremove --purge libreoffice* -y



Graphic tools

1. GIMP

It is a free and open-source Image Editor. Additionally, you can improve your richness with many customization choices and plugins.

sudo apt install gimp -y

2. Krita

Open-source art software. It is made by professionals that want to see affordable design tools for everyone.

sudo apt install krita -y

3. Blender

Free and open-source, 3D creation suite. It supports the aggregate of the 3D pipeline, including modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation.

sudo apt install blender -y

4. Inkscape

Free and open-source, vector graphics editor used to create vector images, primarily in Scalable Vector Graphics (SVG) format. Here you can be an illustrator, designer, web designer, or just someone who wants to create vector imagery.

sudo apt install inkscape -y

Social Apps

1. Telegram

Official Telegram client

flatpak install org.telegram.desktop -y

2. Discord

Official Discord client

flatpak install com.discordapp.Discord -y
BetterDiscord

To install themes and customize it's interface according your liking you can install BetterDiscord. To install BetterDiscord, go here.

3. Facebook Messenger (Caprine)

Unofficial Facebook messenger
Get the installer here

4. Signal

Official Signal client

flatpak install org.signal.Signal -y

5. Whatsapp (WhatsappQT)

Unofficial Whatsapp client

flatpak install io.bit3.WhatsAppQT -y

6. Reddit (Giara)

Better to use Reddit on your browser.

Unofficial Reddit client. Currently, this its on its Beta stage.

flatpak install org.gabmus.giara -y

Programming Apps

1. Atom by GitHub

A hackable text editor for devs.

flatpak install io.atom.Atom -y

2. Pycharm IDE

A Python IDE for devs.

flatpak install pycharm-community -y #use professional if you have a license

Important python modules,

sudo apt install python3-pip python3-dev python3-distutils python3-virenv
pip3 install virtualenv #solves the global package bug

Note: If you use python 2.x use python instead of python3 and pip instead of pip3.

3. GitHub-Desktop

A seamless way to contribute to projects on GitHub.

sudo apt install git github-desktop -y

If this doesn't work, get the deb here.

4. Java

Go through this to get the correct version.

5. Visual Studio

Go through this.

Entertainment Apps

1. Spotify for Music

Supports Ad-block and Spicetify-cli

curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update && sudo apt install spotify-client -y

Features that can be added,

1. Spicetify-Cli & Themes

To install themes for spotify, you can check this, to install different themes, go here out. If you have troubles going through the steps of spicetify-cli. Here is a script you can use.

curl -fsSL https://gist.githubusercontent.com/themagicalmammal/f6f086f9c701924371e1d334c60c8562/raw/6bf8f24e6211c8ea3ba3d028634e58f1af8b971f/spicetify.sh | bash

You need to log-in & out after this.

2. Spotify-Adblock

If you do not like ads, you can install Ad-free Spotify. To simplify the steps go through this.
Note: This might be buggy.

curl -fsSL https://gist.githubusercontent.com/themagicalmammal/81e719ac496790049ecfb745a26dfc9b/raw/f22b8b886307cb58618ccf85f89df3ee8d4dc59d/spotify_adblock.sh | sudo bash

My Spotify
spotify

2. Steam for Gaming

sudo apt install steam -y

If it doesn't work, turn on multiverse.

sudo add-apt-repository multiverse && sudo apt update

3. Multimedia Codecs

Gives you the ability to play popular non-free media formats, including DVD, MP3, Quicktime and Windows Media.

sudo apt install ubuntu-restricted-extras -y

To enable restricted codecs to play DVDs

sudo apt install libdvd-pkg -y
sudo dpkg-reconfigure libdvd-pkg

Productivity Apps

1. Kinto

Key remapper that makes mac user's transition to Linux easier. It provides macOS keyboard shortcuts. So, if you miss your mac shortcut style you can use this.

Other Apps

1. uGet

uGet is a lightweight yet powerful open Source download manager for Linux. Basic features include a download queue, a clipboard monitor, and the ability to process downloads in a batch format.

sudo apt install aria2 uget -y

2. Wine (Windows Apps)

Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications. Remove Wine if you have it installed

  1. If you have a 64-bit system this command will enable 32-bit support
sudo dpkg --add-architecture i386
  1. Then follow these Steps:
wget https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key
sudo apt-add-repository deb\ https://dl.winehq.org/wine-builds/ubuntu/\ $(lsb_release -c | sed 's/Codename:\t/''/g')\ main && sudo apt update
sudo apt install --install-recommends winehq-stable -y
  1. Then open wine configuration, add download the additional wine files
winecfg

Saftey with Wine - Never use wine with sudo. Windows apps always run with admin rights in wine. No sudo needed sometimes, You need to tell wine to start an app as a "normal user" but, you never need to run it with admin rights because it already does. So from this, you could be thinking can't hurt to run wine with sudo, Right? Yes, it can hurt, or do you believe that a potential Virus wouldn't be happy to be run with root rights? Viruses work through wine like they would on Windows. sudo gives them even more privileges.

3. Lutris

Lutris is an Open Source gaming platform for Linux. It installs and launches games so you can start playing without the hassle of setting up your games.

sudo add-apt-repository ppa:lutris-team/lutris
sudo apt update
sudo apt install lutris

4. Synaptic Package manager

Synaptic serves as a graphical front-end to APT which makes the process of software management easier.

sudo apt install synaptic -y

5. Nautilus (admin mode)

Adds right-click property Open as Administrator

sudo apt install nautilus-admin -y && nautilus -q

6. Timeshift

Timeshift is a system restore tool for Linux. Creates a file system snapshot using rsync+hard links or BTRFS snapshots.

sudo apt install timeshift -y

7. Resource Monitor

- Htop

A utility to see which process is taking how much CPU or memory.

sudo apt install htop -y

htop

- Bashtop

An advanced utility that shows usage and stats for processor, memory, disks, network, and processes. Repo already exists in Pop 20.10

sudo add-apt-repository ppa:bashtop-monitor/bashtop && sudo apt update
sudo apt install bashtop -y

bashtop

8. Firewall

- Gufw

GUFW is a graphical utility for managing Uncomplicated Firewall (UFW). This is pretty easy to use appication with bunch of settings which you can set according to your preference.

sudo apt install gufw

- Opensnitch

Helps you to review which services connect to the internet. Also, stopping some of the services might help save some internet, and give you more control over it. To get a compiled version of Opensnitch goes here.

4. Important Tweaks

Settings

-- Privacy Tweaks

privacytweaks1 privacytweaks2

-- Over Amplification

overamplification

Disable annoying Keyring

This provides security for browsers on an autologin-based system. (Easy way to understand it)

If you have an autologin system, whenever you open a browser (except firefox) or Github-desktop, the system asks for a key.

Steps to Disable it:

App password & keys > Login > Change Password > Type your Current Pass > Continue > Continue with Empty Pass > Make unencrypted

disablekeyring1 disablekeyring2

Controlling Audio Devices

Pavucontrol is one of the most well-known audio managers for PulseAudio.

Music playback

In Playback tab, here is a list of all apps that are using your audio system. To mute all System sounds, press the speaker icon in System Sounds. You can also drag the audio slider to adjust the audio.

But, this tab only shows applications currently using audio. Like in this example, I was listening to Spotify.

musicplayback

Recording adjuster

In Recording tab, there is a list of all the programs currently recording audio. It is also possible to mute the recording just by clicking on the speaker icon.

recordingadjuster

Speaker & Mic level

To make a device default press the lock button.
In Output Devices tab, there is a list of all the audio playback devices.

speakerlevel

In Input Devices tab, there is a list of all the recording devices.

miclevel

5. Optimize Boot-time & Ram Usage

My original boot-time was 1min 4sec after removing apps it is now 58sec.

originalboottime

Disabling Plymouth

For Pop OS

sudo kernelstub --delete-options "quiet systemd.show_status=false splash"

For Ubuntu
Go through this guide.

This reduces my boot-time to 35sec

Adjusting the Swappiness Property

This is required to adjust swap usage. If you have huge rams like 16GB ram then you can reduce this value to as low as 0. But if you have low ram devices like 1GB you should make this 90 or higher. Interactions with the swap file are costlier since swaps are slower than RAMs and they can cause a reduction in performance.

Values according to me for Ram: Ratio should be as follows, 32:0, 16:10, 8:20, 4:50, 2:70
20 is just an example value, don't mindlessly use it

sudo sysctl vm.swappiness=20

These values do not stick. To add them permanently. Add the above line to sysctl.conf.

sudo nano /etc/sysctl.conf

Adjusting the Cache Pressure Setting

Another issue, the system stores cache about stuff that you frequently open & this makes the system faster, as if it opens again, rather than reloading the data it will use the cache. But, on a lower ram device, this is a bad option since this will seriously slow your system down.
Adjust this like you adjusted swappiness property, values for RAM: Pressure should be as follows, 1:100, 2:90, 4:80, 8:60, 16:50.

sudo sysctl vm.vfs_cache_pressure=50

Add the above line to sysctl.conf.

sudo nano /etc/sysctl.conf

EarlyOOM

It is a cool new feature enabled in Fedora 33. What is it, you ask? In Layman terms, It frees memory when the ram or the swap gets close to full (over 90%). Making this a beneficial feature for heavy usage. This is a very important feature for old hardware. It only consumes 0.5 to 2 MB in the background.

To install it

sudo apt install earlyoom -y

To check it's status

systemctl status earlyoom

Wayland

Wayland is a new protocol that enables 3D compositors to be used as primary display servers, instead of running the 3D compositor as an extension under the (2D) X.org display server. Or, in layman's terms, it assumes you're using a 3D desktop from the start, instead of bolting on 3D capabilities to an 2D framework.

X.org is the default display manager but, X.org is old and is very bloated, thus uses more resources. So in this way, Wayland can be a better option. But, Wayland is a newer display protocol and thus is incomplete in a way giving the birth yo many bugs, and one of them being NVIDIA. So, if you have an NVIDIA GPU, Wayland is a bad option. Also, if you don't have NVIDIA GPU, still there might be bugs, so if you have bugs/glitches, remove it.(Remove the #).

  1. Edit the /etc/gdm3/custom.conf to either disable or enable Wayland.
sudo nano /etc/gdm3/custom.conf
  1. Add # before this line
WaylandEnable=false
  1. Then
sudo systemctl restart gdm3
  1. Then select it in the login
    wayland
  2. To confirm
echo $XDG_SESSION_TYPE

Output should be Wayland

Disabling Unnecessary Extensions

Pop OS comes with a lot of Extensions which generally is not used by everyone so you can prefer to disable them you can.
The built-in extensions I use are -

gnomeextensions

I have disabled these

  1. Alt-Tab - By default, Alt+Tab will raise all windows of an application. This extension still groups windows by application.
  2. Always show workspaces - Always show workspaces in the overview.
  3. Desktop Icons - Add icons to the desktop.
  4. Pop Battery Icon Fix - Fixes the battery icon to match the current battery level. (Useless for desktop pc)
  5. Pop Shop Details - Adds a Show Details item to applications if Pop Shop is installed.
  6. System76 Power - system76-power is a utility for managing graphics and power profiles. Options show up under battery menu. (Useful for hybrid and NVIDIA GPU)

Disabling Pop Shop on Boot

Pop Shop always opens on the startup of the system there is a way to stop that. This also helps in saving some ram.

Steps:

  1. Edit App center daemon from opening it at start
sudo nano /usr/share/applications/io.elementary.appcenter-daemon.desktop
  1. Put # here before this line
Exec=io.elemantry.appcenter -s

Clearing buff/cache

The computer accumulates high buff/cache over time and makes the user force reboot. To clear buff cache, you can use this.

free -h && sudo sysctl -w vm.drop_caches=3 && sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -h

Optimizing the boot

DISCLAIMER

PLEASE DO THIS AT YOUR OWN RISK. WHILE THIS IS SAFE TO DO YOU CAN STILL MESS UP YOUR SYSTEM SO, PLEASE READ THIS CAREFULLY AND UNDERSTAND EVERYTHING BEFORE YOU PROCEED.
  • Network-dispatcher is a dispatcher daemon for systemd-networkd connection status changes.
sudo apt remove --purge networkd-dispatcher -y
  • ModemManager is a DBus-activated daemon that controls mobile broadband (2G/3G/4G) interfaces. If you do not have a mobile broadband interface, you do not need this.
sudo systemctl disable ModemManager.service
sudo systemctl mask ModemManager.service

Note: - If you are not using this and don't want Wi-Fi to disable wpa_supplicant.service.

  • fwupd is a simple daemon allowing you to update some devices' firmware, including UEFI for several machines Disable thunderbolt_power
sudo nano /etc/fwupd/daemon.conf

Make it

BlacklistPlugins=test;invalid;thunderbolt_power

blacklist_thunderbold Remove fwupd from boot

sudo systemctl disable fwupd.service
sudo systemctl mask fwupd.service
  • Avahi-daemon is supposed to provide zero-configuration network discovery and make it super-easy to find printers and other hosts on your network. I always disable it and do not miss it.
sudo systemctl disable avahi-daemon.service
sudo systemctl mask avahi-daemon.service
  • Apport collects potentially sensitive data, such as core dumps, stack traces, and log files. They can contain passwords, credit card numbers, serial numbers, and other private material.
sudo systemctl disable apport.service
sudo systemctl mask apport.service
  • Saned is the SANE (Scanner Access Now Easy) daemon that allows remote clients to access image acquisition devices available on the localhost.
sudo systemctl disable saned.service
sudo systemctl mask saned.service
  • GPU-Manager is software that creates a xorg.conf for you. So running this in every boot is just overkill. You only need to run this if you change your GPU.
sudo systemctl disable gpu-manager.service
sudo systemctl mask gpu-manager.service
  • Apt-daily-upgrade solves long boot up time with apt-daily-upgrade.
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service
  • lvm2-monitor Only useful if you are using lvm.
sudo systemctl disable lvm2-monitor.service
sudo systemctl mask lvm2-monitor.service
  • Systemd-resolved [Restart Required] is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver.
  1. Disable & Mask the systemd-resolved service
sudo systemctl stop systemd-resolved.service
sudo systemctl disable systemd-resolved.service
sudo systemctl mask systemd-resolved.service
  1. Then put dns=default in the [main] section of
sudo nano /etc/NetworkManager/NetworkManager.conf
  1. Delete the symlink /etc/resolv.conf
sudo rm /etc/resolv.conf
  1. Restart

Might be UnSafe

  • Switcheroo-control [Required on Dual-GPU systems] is a D-Bus service to check the availability of dual-GPU. Keep this only if you have 2 GPUs.
sudo systemctl disable switcheroo-control.service
sudo systemctl mask switcheroo-control.service
  • System76-power [Required on laptops] Power Controls for lappy not required on a desktop PC.
sudo systemctl disable system76-power.service
sudo systemctl mask system76-power.service
  • Thermald [Might heatup system] daemon prevents machines from overheating and was introduced in the 14.04 Ubuntu Trusty LTS release. It monitors thermal sensors and will modify cooling controls to keep the hardware cool.
    If your system heats after removing this even a bit, add it back
sudo systemctl disable thermald.service
sudo systemctl mask thermald.service

Enable them back
Let the service name be xyz.service

sudo systemctl unmask xyz.service
sudo systemctl enable xyz.service
  • Disabling Startup Application Preferences

application-pref

Boot-time after disabling those stuff

prekernelbootime

Custom kernel

Custom Kernels are known and used by fewer people, but these kernels add a significant boost to performance and battery.

  1. Xanmod is the more popular choice among intel based hardware. It provides a stable, responsive, and smooth desktop experience.
    To get Xanmod, go here
    While installing this don't forget to add, Setting the FQ-PIE Queuing Discipline.

  2. Liquorix is a distro kernel replacement built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads. Works better with AMD hardware.
    To get Liquorix, go here

Initial benchmarks on intel make Xanmod a winner whereas, AMD hardware generally goes better with Liquorix. Also, if you are having heating issues go for Liquorix for a better thermal response. I use Xanmod normal because long term release felt slow for me on both my PC & lappy.

Reference of Xanmod being compared to Clear Linux
Reference of Liquorix Kernel Benchmarks For AMD Ryzen
Linux Generic vs Xanmod vs Liquorix (Not English but you can see the benchmark scores.)

Note: At this point, boot is the fastest.

Getting rid of Custom Kernel

IF YOU ARE A NEW USER AND DON'T KNOW WHAT YOU ARE DOING, PLEASE SEARCH SOME THREADS OR ASK SOMEONE BEFORE TAKING ANY ACTION. BECAUSE THIS IS A VERY RISKY STEP AND CAN POTENTIALLY KILL YOUR SYSTEM.

  1. Removing the Kernel apt modules

For XanMod

sudo apt autoremove --purge linux-xanmod -y

For Liquorix

sudo apt autoremove --purge linux-image-liquorix-amd64 linux-headers-liquorix-amd64 -y
  1. [XanMod Only] Remove FQ-PIE Queue Discipline for systemd
sudo rm /etc/sysctl.d/90-override.conf
  1. Removing the Kernel Repos

For XanMod
Download this deb and uninstall it.

For Liquorix

sudo add-apt-repository -r ppa:damentz/liquorix

Tip: -r can be after or before the repo, so you can also write,

sudo add-apt-repository ppa:damentz/liquorix -r
  1. Getting, name of the Kernel
uname -r
  1. Removing the Kernel
sudo apt remove <kernel name> -y
  1. Getting, remaining Kernel files
apt list --installed *xanmod* *liquorix*
  1. Removing the remaining Kernel files
sudo apt remove <name of kernel files> -y

Reference of installing and removing XanMod

Final Boot-Time

final-boottime

6. Miscellaneous

Ad-Hosts

I use Steven Black Ad-Hosts for ad-blocking the whole system without any other extra app. This blocks basic ads but not YouTube or Spotify ads.

I use Unified hosts + fake news + gambling + porn

Q. How to?

Ans. Steps:

  1. Get a host
  2. Save it to Downloads
  3. Then
sudo mv $(xdg-user-dir DOWNLOAD)/hosts.txt /etc/hosts

Terminal Mods

1. Neofetch Mod

Neofetch displays information about your operating system, software and hardware. This comes with a default config which has a lot of information including CPU,GPU blah blah blah. Me being a minimalist only use some information out of this.
So, my custom config, makes the neofetch look like this.

neofetch
To make your neofetch look this, go here.

2. Shell Config

I am currently using Starship shell config with Dark Patrol from Gogh.
Note: If you have troubles installing starship with shell script you can install it via brew.
To make your terminal look like mine, go here.
terminal

3. Bash Alias

A Bash Alias is a method of supplementing or overriding Bash commands with new ones.

Get my .bash_alias file from here. Add this to your .bash.rc

if [ -f ~/.bash_alias ]; then . ~/.bash_alias fi

TLP

TLP is a utility for battery optimization on laptops. TLP comes with a default configuration which is perfectly tuned. The utility works by optimizing the power used by hardware devices while your laptop is running on its battery.

sudo apt install tlp
sudo tlp start

If you need a graphical interface to optimise or control it.

sudo add-apt-repository ppa:linuxuprising/apps && sudo apt update
sudo apt install tlpui

Disable Frequents

Disable Frequents Tab in Gnome app menu. This option is not required for Gnome > 3.38.

gsettings set org.gnome.desktop.privacy remember-app-usage false

Clean your System

Clean via Terminal

sudo apt --purge autoremove
sudo rm -rf ~/.cache/thumbnails/*
sudo apt clean
sudo apt autoclean

Bleachbit

I use Bleachbit because it is good to remove unnecessary junk from your computer.

sudo apt install bleachbit -y

Steps: BleachBit (root) > Select every option (except free disk) > Clean

bleachbit Note: After doing this the first boot might be slow don't worry it's perfectly normal.

Night Light

Night Light mode is simply made to remove some lights which hinder our sleep cycle. As researchers have found that at night if a certain set of colors interact with our eyes it doesn't let the eye rest making it unsleepy that's why we use a night light.

Steps: Settings > Display > Night light
You can also select the timing which fits your sleep cycle.

nightlight

Tile Windows

The beautiful thing I like about Pop OS is its feature-rich environment to increase work efficiency.

Tile-windows

Custom Fonts

Custom Fonts increase the user experience. I use custom fonts on my laptop and also my Oneplus.

Currently I am using Linotte Font for system & MonoFur for my terminal.
To change your font, go to gnome-tweaks then to Fonts.

customfont To change Terminal font, Go to preferences, then to profiles, then in custom font select MonoFur.
To get my fonts,

wget https://github.com/themagicalmammal/howtopopbuntu/raw/master/.local/share/fonts.tar.xz
tar -xf $(xdg-user-dir DOWNLOAD)/fonts.tar.xz -C ${XDG_CONFIG_HOME:-~/.local}/share
rm $(xdg-user-dir DOWNLOAD)/fonts.tar.xz

If the font doesn't show, you can try clearing the font cache

fc-cache -f -v

Customization

1. We need to add gnome-shell-integration for Chrome.

gsi

2. Then go to Gnome.org and get your extensions.

Important Extensions

Some More Cool Extensions

3. Custom themes

Go to Gnome-look

My Setup
Shell & Application - WhiteSur-light
Cursor - Bibata
Icons - McMojave-circle
Wallpaper - Colorful New York

4. Place the theme in .themes & the icons in .icons in Home.

5. In the Gnome tweak tool, Select your theme.

Tip - How to fix terminal theme

  1. Go to Preferences.
  2. Add Profiles.
  3. Name it Big_Sur.
  4. Go to colors, then select choose use colors from system theme.
  5. Set Big_Sur default.
  6. Close and reopen the terminal.

Tip - How to fix gedit/text-editor theme

  1. Go to Preferences.
  2. Go to Font & Colors.
  3. Select Color Scheme - Classic.

Tip - Add icon instead of Activities text

  1. Go to Extensions.
  2. Open settings for Activities Configurator.
  3. Select a custom icon The icon I use is here
  4. Hide Text & reduce icon padding

After you do all of this, your desktop should look this

bigsurlikelook

To fix qt5 applications like KolourPaint to respect system theme, go here.

Thanks for Suggestions

  1. GGG_246 - A lot of stuff I didn't know. To check what he did go here & here & a looooot more stuff.
  2. schykle - Mailspring (fix for dangerous gvfs-bin bug) & Ubiquity auto Swap & GUI updater & Updated Snap instructions.
  3. wsadES - Suggestion about removing unnecessary extension & Pop Shop on boot.
  4. tur1ngb0x - For qt5 theme fix & new wine installation steps.
  5. coolwyou - For the awesome neofetch config file & shell config.
  6. spxak1 - Mention Firefox & Chromium-based Bug & Idea about Disclaimer & Reverting back to stock kernel.
  7. JawadAlkassim - Mention opensource & Vivaldi vaapi & Wayland.
  8. arsfeld - Information about Encryption and recovery.
  9. lulzdoods - Completing the uninstall guide for the kernel.
  10. RiderExMachina - Check out what he said here
  11. 1ntr0v3rt3ch - For steps for making a swap file.
  12. rbmorse - Practices on a swap.