Skip to the content.

Setup Necessary Features on Linux 22.04

System Update Installation

sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh

Set System Time

# to set timezone as Istanbul
sudo timedatectl set-timezone Europe/Istanbul
# to choose timezone manually: sudo dpkg-reconfigure tzdata

# to show the seconds on desktop clock
gsettings set org.gnome.desktop.interface clock-show-seconds true

# to setup auxiliary packages
sudo apt-get install ntp ntpdate -y

# to setup NTP server
sudo ntpdate ntp.ubuntu.com

# to get timezone and current time
timedatectl status

Set Keyboard Setting for Türkçe

setxkbmap tr

Ubuntu Settings

## appearance
### style
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface icon-theme  'Yaru-sage'
### desktop icons
gsettings set org.gnome.shell.extensions.ding icon-size 'standard'
gsettings set org.gnome.shell.extensions.ding start-corner 'top-left'
### dock
gsettings set org.gnome.shell.extensions.dash-to-dock autohide true
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 24
gsettings set org.gnome.shell.extensions.dash-to-dock multi-monitor true
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT'
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
gsettings set org.gnome.shell.extensions.dash-to-dock show-show-apps-button true
## sound
### system volume
gsettings set org.gnome.desktop.sound allow-volume-above-100-percent true
## power
### power saving options
gsettings set org.gnome.desktop.session idle-delay 900
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1200
### suspend & power button
gsettings set org.gnome.desktop.interface show-battery-percentage true

Check Drivers

sudo ubuntu-drivers autoinstall

Desktop Configurations

# to set the position of the dock to the left
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT'

# to minimize/extend all windows of a folder/program with one click
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

# to switch between windows of a folder/program with mouse rolling
gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'

NOTE: To see more configurations about dock visit

Guake

sudo apt-get install guake -y

Guake Configurations

The Fuck

sudo apt install python3-dev python3-pip python3-setuptools
pip3 install thefuck --user

Necessary Packages

sudo apt install axel bat boxes caffeine curl figlet gnome-tweaks gpustat hardinfo hashcat locate lolcat meld net-tools nvtop pdftk pv ranger testdisk tmux tree unrar xclip vim magic-wormhole -y

Ulauncher

sudo add-apt-repository universe -y && sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher -y

TLDR

sudo apt install tldr -y
tldr -u

MC

sudo apt install mc -y

GNOME Sushi

sudo apt install gnome-sushi -y

GNOME Screenshot

# Install required packages
sudo apt install gnome-screenshot xclip -y

### Set up custom shortcut for taking screenshots with Windows key + Shift + S
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot '<Super><Shift>s'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Take a Screenshot'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super><Shift>s'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command "sh -c 'gnome-screenshot -af ~/Pictures/\$(date "+%Y.%m.%d-%H.%M.%S").png'"
### Add the custom shortcut to the list of custom shortcuts
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[ '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/' ]"
### Add the necessary permissions to the custom shortcut
sudo chmod ugo+rwx /home/$USER/Pictures/*

Master PDF Editor

sudo snap install master-pdf-editor-5 -y

GIMP Image Editor

sudo apt install gimp -y

NOTE: To see an example and have some tips, visit Ubuntu Community Retouch Photos

LYNX

sudo apt install lynx -y

TUXEDO Control Center

# add repositories in apt list (my case it is "jammy" but it may subject to change depending on your condition)
echo -e "deb https://deb.tuxedocomputers.com/ubuntu jammy main" | sudo tee -a /etc/apt/sources.list.d/tuxedocomputers.list

# dive into source directory
cd /etc/apt/trusted.gpg.d/

# dowload the programm
sudo wget https://deb.tuxedocomputers.com/0x54840598.pub.asc

# update and install the program
sudo apt update
sudo apt install tuxedo-control-center -y

Firefox

# remove existing Firefox Snap package
sudo snap remove firefox
# install Firefox from the PPA
sudo apt update
# purge Firefox
sudo apt purge firefox -y
# install Firefox
sudo apt install firefox -y

Chromium

sudo apt install chromium-browser -y

Syncthing

# Add the release PGP keys
sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
# Add the "stable" channel to your APT sources
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
sudo apt-get update
sudo apt-get install syncthing -y

Cockpit

Cockpit is an interactive server admin interface. It is easy to use and very lightweight.

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit -y

After that, type localhost:9090 on your browser and login with your system’s username and password.

Windsurf

# Add the release PGP keys
curl -fsSL "https://windsurf-stable.codeiumdata.com/wVxQEIWkwPUEAGf3/windsurf.gpg" | sudo gpg --dearmor -o /usr/share/keyrings/windsurf-stable-archive-keyring.gpg
# Add the "stable" channel to your APT sources
echo "deb [signed-by=/usr/share/keyrings/windsurf-stable-archive-keyring.gpg arch=amd64] https://windsurf-stable.codeiumdata.com/wVxQEIWkwPUEAGf3/apt stable main" | sudo tee /etc/apt/sources.list.d/windsurf.list > /dev/null
# Update the system
sudo apt update
# Install Windsurf
sudo apt upgrade windsurf -y

Ref: Windsurf - Codeium

NOTE: Useful Windsurf extensions and related setting.json file can be found from here

Visual Studio Code

sudo rm /etc/apt/sources.list.d/vscode.list
sudo rm /usr/share/keyrings/vscode.gpg
sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code -y

Ref: linuxhint

NOTE: Other useful VSCode extensions and related setting.json file can be found from here

WPS Office

# dive into download directory
cd ~/Downloads/
# download WPS Office
wget https://wps-community.org/wps-office_11.1.0.11723.XA_amd64.deb
# install the downloaded file
sudo dpkg -i wps-office_11.1.0.11723.XA_amd64.deb

Notion

echo "deb [trusted=yes] https://apt.fury.io/notion-repackaged/ /" | sudo tee /etc/apt/sources.list.d/notion-repackaged.list
sudo apt update
sudo apt install notion-app-enhanced -y
sudo apt install notion-app -y

Git

sudo apt-get install git -y
git config --global user.email "osmankayi06@gmail.com"
git config --global user.name "OsmanKAYI"
# to set the default branch name as "main"
git config --global init.defaultBranch main

GitHub Configurations

cd ~/.ssh
ssh-keygen -o -t rsa -C "osmankayi06@gmail.com"
# Public name will be saved as osmankayi instead of id_rsa
ssh-add ~/.ssh/osmankayi

cat osmankayi.pub

Apache

sudo apt install apache2 apache2-utils -y
sudo rm -f /var/www/html/index.html
sudo systemctl enable apache2
sudo service apache2 restart

Apache Configurations

sudo adduser $USER www-data
sudo chown -R $USER:www-data /var/www/html/

PHP

sudo apt install php -y
sudo service apache2 restart

NOTE: Two different verisons of php can be used with following the instructions 🚩here🚩

NOTE: The max uploaded file size can be increased from here🚩

Xdebug

sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo find /usr/ -name xdebug.so
sudo apt-get purge php7.4-xdebug
sudo apt-get install php7.4-xdebug
sudo vi /etc/php/7.4/apache2/conf.d/20-xdebug.ini

Add following 3 lines in 20-xdebug.ini

zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.start_with_request=yes

Restart Apache Service

sudo systemctl restart apache2

How To Use Xdebug with VSCode

Composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

# put the composer.phar into a directory on your PATH, so you can simply call composer from any directory (Global install)
sudo mv composer.phar /usr/local/bin/composer

How To Watch Errors Real-time

sudo tail -f /var/log/apache2/error.log

MariaDB

sudo apt install mariadb-server mariadb-client -y
sudo systemctl enable mariadb
sudo service mariadb restart
### sudo mysql_secure_installation
## mysql password reset
mysql --user="root" --password="" --execute="use mysql; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root'); flush privileges;"

MariaDB Password Reset (if you forgot your password)

sudo service mariadb vstop
sudo mysqld_safe --skip-grant-tables --skip-networking --skip-networking &
mysql -u root
  use mysql;
  update user set password=PASSWORD("root") where User='root';
  flush privileges;
  quit;
sudo kill `sudo cat /var/run/mysqld/mysqld.pid`
sudo service mariadb start

Redis

sudo apt install redis-server php-redis -y
systemctl enable redis-server
systemctl start redis-server

Start Redis With Password

sudo vim /etc/redis/redis.conf

Change Redis Password

redis-cli
#if exists
AUTH oldpassword
CONFIG SET requirepass "newpassword"
CONFIG REWRITE

Restart Services

sudo service apache2 restart
sudo service mariadb restart
sudo systemctl enable mariadb
sudo systemctl enable apache2

html Configurations

sudo adduser $USER www-data
sudo chown -R $USER:www-data /var/www/html/
cd ~/Desktop
ln -s /var/www/html/
sudo rm -f /var/www/html/index.html

Adminer

cd /var/www/html
mkdir adminer
cd adminer
wget -O index.php https://www.adminer.org/latest.php

Node with NVM

# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# start nvm
source ~/.bashrc
# list remote versions
nvm ls-remote
# install latest node version
nvm install node  # "node" is an alias for the latest version

Degit

npm i degit -g

Example Usage: degit $username/$projectname

Vue

# choose a $projectname, after that, choose `No` unless you know what you are doing
npm init vue@latest
cd $projectname

# project setup
npm install

# compile and hot-reload for development
npm run dev
# compile and minify for production
npm run build

NOTE: If you face with some problems in npm init vue@latest, which is generally because of node version installed in machine, run the following.

npm cache clean -f
npm install -g n
n stable

NOTE: If you see a warning about spoof.js, it can be beacuse of one of the firefox extensions (ex: Mobile simulator).

Draw.io

curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i -
sudo apt -f install ./drawio-amd64-*.deb

Anaconda

Jupyter Notebook

jupyter notebook # to start jupyter notebook while you are in the conda terminal

Convert Output to PDF

sudo apt install texlive-xetex texlive-fonts-recommended texlive-plain-generic # install texlive packages
sudo apt install pandoc # install pandoc package

Completely Remove Anaconda

rm -rf ~/anaconda3 ~/.conda

# to edit the ~/.bashrc file
vim ~/.bashrc

GPT4All

cd ~/source/
mkdir gpt4all/
cd gpt4all/
wget https://gpt4all.io/installers/gpt4all-installer-linux.run
chmod +x gpt4all-installer-linux.run
./gpt4all-installer-linux.run
cd ~/gpt4all/bin
# run the file called "chat"

gphotos-sync

apt install python3-pip
# install gphotos-sync wih pip:
python3 -m pip install gphotos-sync
# export ~/.local/bin in PATH if you haven't already (that's where the executables for packages installed using pip3 are stored)
echo "export PATH=\"\$PATH:\$HOME/.local/bin\"" >> ~/.bashrc
# run .bashrc for updated PATH
source ~/.bashrc

OpenSSH

sudo apt-get install openssh-server -y
sudo systemctl enable ssh
sudo systemctl start ssh

Copy SSH Public Key To Remote Server

ssh-copy-id -i ~/.ssh/id_rsa user@server

How To Copy Files Within SSH Servers

scp -r user@server:/file/to/path ./local/path/to/copy

Securely Stop SSH Server

sudo service sshd stop
sudo systemctl disable sshd

Postman

# download postman app on ubuntu
wget https://dl.pstmn.io/download/latest/linux64

# extract postman linux64 compressed file
sudo tar -xvf linux64 -C /usr/bin

# add this API testing tool to system PATH
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc
source ~/.bashrc

# create launcher shortcut
echo "[Desktop Entry]
Name=Postman API Tool
GenericName=Postman
Comment=Testing API
Exec=/usr/bin/Postman/Postman
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/usr/bin/Postman/app/resources/app/assets/icon.png
StartupWMClass=Postman
StartupNotify=true" | sudo tee /usr/share/applications/Postman.desktop

Completely Remove Postman

sudo rm -r /usr/bin/Postman
sudo rm -r /usr/share/applications/Postman.desktop
sudo rm -r ~/Desktop/Postman.desktop

SoapUI Open Source

Intallation:

cd Downloads/
bash SoapUI-*

AutoKey

sudo apt install autokey-gtk -y

Knime

# use "wget" to download the Knime tool
wget https://download.knime.org/analytics-platform/linux/knime-latest-linux.gtk.x86_64.tar.gz

# extract the compressed file
tar -xvzf knime-latest-linux.gtk.x86_64.tar.gz

# change the directory and move into the extracted folder
cd knime_*/

# run the executable file in the folder
./knime

VirtualBox

sudo apt install virtualbox -y

VirtualBox Full-Screen Configurations

sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r) -y
cd ~/media/$USER/VBox_GAs_6.1.381
./autorun.sh
reboot

VLC Media Player

sudo apt install vlc -y

Anydesk

wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -
echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk-stable.list
cd ~/Downloads/
sudo apt install anydesk -y

NOTE: If the screen share is not working, use following commands.

echo $XDG_SESSION_TYPE
sudo vi /etc/gdm3/custom.conf
# uncomment this line   ===>    WaylandEnable=false
# and reboot your system

Discord

Zoom

Telegram

sudo apt install telegram-desktop -y

Steam

sudo add-apt-repository multiverse -y
sudo apt install steam -y

Fritzing

sudo apt install fritzing -y

Sweet Home 3D

sudo apt install flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.sweethome3d.Sweethome3d -y
flatpak update com.sweethome3d.Sweethome3d
sudo apt install sweethome3d -y

Startup Applications

## create the directory (if it doesn’t exist):
mkdir -p ~/.config/autostart
## ezanvakti.desktop
echo -e '[Desktop Entry]\nType=Application\nExec=ezanvakti\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\nName=Ezan Vakti' > ~/.config/autostart/ezanvakti.desktop
## guake.desktop
echo -e '[Desktop Entry]\nName[tr]=Guake Uçbirim\nName=Guake Terminal\nComment=Use the command line in a Quake-like terminal\nTryExec=guake\nExec=guake\nIcon=guake\nType=Application\nCategories=GNOME;GTK;System;Utility;TerminalEmulator;\nStartupNotify=true\nX-Desktop-File-Install-Version=0.22\nX-GNOME-Autostart-enabled=true\nHidden=false\nNoDisplay=false' > ~/.config/autostart/guake.desktop
## caffeine.desktop
echo -e '[Desktop Entry]\nIcon=caffeine\nName=Caffeine\nComment=Temporarily deactivate the screensaver and sleep mode\nExec=caffeine-indicator\nTerminal=false\nType=Application\nCategories=Utility;\nKeywords=Screensaver,Power,Saving,Blank\nStartupNotify=false' > ~/.config/autostart/caffeine.desktop
## ulauncher
echo -e '[Desktop Entry]\nName=Ulauncher\nComment=Application launcher for Linux\nExec=env GDK_BACKEND=x11 /usr/bin/ulauncher --hide-window --hide-window\nIcon=ulauncher\nTerminal=false\nType=Application\nCategories=Utility;Application;' > ~/.config/autostart/ulauncher.desktop

Favorite Applications

gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop', 'org.gnome.SystemMonitor.desktop', 'virtualbox.desktop', 'thunderbird.desktop', 'firefox_firefox.desktop', 'chromium-browser.desktop', 'telegram.desktop', 'Postman.desktop', 'code.desktop', 'wps-office-prometheus.desktop', 'zotero.desktop', 'org.fritzing.Fritzing.desktop']"

Settings

## appearance
### style
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface icon-theme 'Yaru-sage-dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface font-name 'Ubuntu 11'
gsettings set org.gnome.desktop.interface document-font-name 'Sans 11'
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-sage-dark'
gsettings set org.gnome.desktop.interface gtk-color-scheme ''
gsettings set org.gnome.desktop.interface gtk-color-palette 'black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90'
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true
gsettings set org.gnome.desktop.interface gtk-im-module ''
gsettings set org.gnome.desktop.interface gtk-im-preedit-style 'callback'
gsettings set org.gnome.desktop.interface gtk-im-status-style 'callback'
gsettings set org.gnome.desktop.interface gtk-key-theme 'Default'
gsettings set org.gnome.desktop.interface font-antialiasing 'rgba'
gsettings set org.gnome.desktop.interface font-hinting 'slight'
gsettings set org.gnome.desktop.interface font-rgba-order 'rgb'
gsettings set org.gnome.desktop.interface enable-animations true
gsettings set org.gnome.desktop.interface overlay-scrolling true
gsettings set org.gnome.desktop.interface cursor-size 24
gsettings set org.gnome.desktop.interface cursor-blink true
gsettings set org.gnome.desktop.interface cursor-blink-time 1200
gsettings set org.gnome.desktop.interface cursor-blink-timeout 10
gsettings set org.gnome.desktop.interface scaling-factor uint32 0
gsettings set org.gnome.desktop.interface text-scaling-factor 1.0

### desktop icons
gsettings set org.gnome.shell.extensions.ding icon-size 'standard'
gsettings set org.gnome.shell.extensions.ding start-corner 'top-left'

### dock
gsettings set org.gnome.shell.extensions.dash-to-dock autohide true
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 24
gsettings set org.gnome.shell.extensions.dash-to-dock multi-monitor true
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT'
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
gsettings set org.gnome.shell.extensions.dash-to-dock show-show-apps-button true

## sound
### system volume
gsettings set org.gnome.desktop.sound allow-volume-above-100-percent true

## power
### power saving options
gsettings set org.gnome.desktop.session idle-delay 900
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1200

### suspend & power button
gsettings set org.gnome.desktop.interface show-battery-percentage true

### additional
gsettings set org.gnome.desktop.interface can-change-accels false
gsettings set org.gnome.desktop.interface clock-format '24h'
gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.desktop.interface clock-show-seconds true
gsettings set org.gnome.desktop.interface clock-show-weekday true
gsettings set org.gnome.desktop.interface enable-hot-corners false
gsettings set org.gnome.desktop.interface locate-pointer true
gsettings set org.gnome.desktop.interface menubar-accel 'F10'
gsettings set org.gnome.desktop.interface menubar-detachable false
gsettings set org.gnome.desktop.interface menus-have-tearoff false
gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Sans Mono 13'
gsettings set org.gnome.desktop.interface toolbar-detachable false
gsettings set org.gnome.desktop.interface toolbar-icons-size 'large'
gsettings set org.gnome.desktop.interface toolbar-style 'both-horiz'
gsettings set org.gnome.desktop.interface toolkit-accessibility false