The Useful Linux After-Install Todo List (ed. 63) (the useful list)

Recommended first actions after installing a a new Linux system. The original useful TULAIT-list.

This list is for people that want to get productive fast with a new Linux install. These steps will provide a lightweight system with a small footprint, and will make sure that most of the essentials will get installed and not forgot.

While the list is based on Debian based Linux systems, it is such a useful list that it is even useful for non-Debian based distros. It is formatted as a text file and all link URLs are spelled out in case you would want a printed version for recovery purposes.


    

THE USEFUL LINUX AFTER-INSTALL TODO LIST

(Edition 63) The first part of this list has the essential steps, these are probably most useful for most people. This part should be followed from top down, as some items "above" will prepare the ground for some items "below". Below that everything is suggestions: You may want to follow some of these but certainly not all of them! If there is something you do not think you will need, you probably won't. So, just skip it. That's easy. Priority is on lightweight and useful, with a thought to privacy and security. While the list does not cover system hardening as such the suggestions below are at least not counter productive. ------------------------------------------------------------------------ ------------------------------------------------------------------------ Below, "#" means: Enter the rest of this line in a terminal (without the #-sign) ------------------------------------------------------------------------ ------------------------------------------------------------------------

TABLE OF CONTENTS

  1. PART 1: THE ESSENTIALS
    1. CONFIGURE ESSENTIALS
    2. REDUCE INSTALLATION SIZE ("footprint")
    3. INSTALL THE ABSOLUTE ESSENTIALS
    4. FIREFOX, INITIAL/BASIC HARDENING
  2. PART 2: OPTIONAL SUGGESTIONS
    1. APPLICATIONS AND UTILITIES
    2. SYSTEM TOOLS
    3. DEVELOPER TOOLS AND PROGRAMS
    4. LOCALHOST WEB SERVER
  3. PART 3: APPENDICES
    1. APPENDIX: Before you install anything, simulate
    2. APPENDIX: Installing from "backports"

------------------------------------------------------------------------
------------------------------------------------------------------------

PART 1: THE ESSENTIALS

------------------------------------------------------------------------ ------------------------------------------------------------------------

CONFIGURE ESSENTIALS

Configure sudo
# su -> enter pass when prompted, then: # visudo or (if visudo is not installed): # su -> enter pass when prompted, then: # nano /etc/sudoers - navigate cursor to "root line". Looks like this: root ALL=(ALL:ALL) ALL - copy root line to new line below ("cut" + two times "uncut") - replace "root" in line 2 with your user name - save+exit: [ctrl]+[o] then [ctrl]+[x] last, remember to exit 'su': # exit now, never type 'su' again please.
Configure time and date
# sudo date --set="2021-08-31 09:30:00" - check time, date, timezone # timedatectl - change timezone, if required # sudo tzselect (just follow instructions on screen) - - alternative method: # sudo timedatectl set-timezone Europe/Copenhagen (replace "Europe/Copenhagen" with your timezone)
Configure locale (languages, date-time formats etc)
https://wiki.debian.org/Locale # sudo nano /etc/default/locale - add: LC_TIME="en_DK.UTF-8" LC_PAPER="en_DK.UTF-8" LC_MEASUREMENT="en_DK.UTF-8" Note: Replace "en_DK" with your preferred locale - then # sudo dpkg-reconfigure locales if you do not have "dpkg-reconfigure", install debconf # sudo apt install debconf - then: # sudo dpkg-reconfigure locales
Configure software sources
# sudo nano /etc/apt/sources.list example sources.list content (complete "bullseye" all inclusive): -------------------------------------------------------------------- deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free deb http://deb.debian.org/debian/ bullseye main contrib non-free deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free -------------------------------------------------------------------- Note: Above "bullseye" may be replaced with "stable". But if you do that you may risk a bit of a chaotic upgrade process when the stable release changes from "bullseye" to the next version, in a few years. The update/install software (typically "apt" on Debian) will inform you that the stable version has changed when it does so.
Configure certificate settings
Disallow random software programs from installing root certificates without even asking you. You will NOT want that, as allowing random software to decide what/who your PC should trust without any kind of control is a major security risk. So: # sudo dpkg-reconfigure ca-certificates In the first step you may want to answer "Ask" in order to be, well, asked, when software tries to install certificates. Alternatively "No", to disallow it. The default setting of "Yes" is asking for trouble and, well, insane. I suspect this is a glimpse and that future systems may get a more sane default setting. Above command will also let you add/remove certificates the proper way (you may not need that right now, so reference for later). To update certificates, eg. after manual removal (not required after above command): # sudo update-ca-certificates Some starting points for research/information: - https://en.wikipedia.org/wiki/Root_certificate - https://www.eff.org/observatory - windows-specific, easy read (and very "tsh, no-problem"-ish), still: - https://proprivacy.com/guides/root-certificates-explained
Check status for Apparmor system protection
You probably just need to check if installed and running (it should be) # sudo aa-status More info: https://www.apparmor.net/ ------------------------------------------------------------------------

REDUCE INSTALLATION SIZE

also see: https://wiki.debian.org/ReduceDebian - first check current install size and available space # df -h
Remove irrelevant languages
Below languages Danish and English have been kept ("da" + "en"). Please adjust to your needs. If you have no need for Danish or English just remove those language and keep only the one(s) you want to use.
Manual pages
# aptitude search manpages -> then (adjust as appropriate): # sudo apt purge manpages-zh manpages-tr manpages-ro manpages-pt-br # sudo apt purge manpages-pl manpages-pl-dev manpages-nl manpages-mk # sudo apt purge manpages-ja manpages-ja-dev manpages-it manpages-hu # sudo apt purge manpages-fr manpages-es manpages-de
Spell check, dictionaries etc
# aptitude search aspell -> apt purge aspell # aptitude search ispell -> apt purge ispell (note: above process will yield temporary errors and throw up dialogs - just click accept + will also remove ispell dictionaries: ibrazilian igerman etc) # aptitude search hunspell -> apt purge hunspell # aptitude search hyphen -> then: # apt purge hyphen-lt hyphen-hr hyphen-hu hyphen-de
Desktop language versioning
Below languages Danish and English have been kept ("da" + "en"). Please adjust to your needs. If you have no need for Danish or English just remove those language and keep only the one(s) you want to use. # aptitude search task- # sudo apt purge task-a* task-ba* task-be* task-bo* task-braz* task-bul* # sudo apt purge task-c* # sudo apt purge task-du* task-dz* task-es* task-f* task-ga* task-ge* # sudo apt purge task-gr* task-gu* task-h* task-i* task-j* task-k* # sudo apt purge task-lat* task-lit* task-m* task-n* task-p* task-r* # sudo apt purge task-s* task-t* task-u* task-v* task-w* task-xh* # sudo apt autoremove Below should already have been atoremoved (unwanted languages) -> if not, run 'apt purge' on them # aptitude search libreoffice-l10n # aptitude search libreoffice-help # aptitude search myspell # aptitude search mythes
Exotic input methods, multi language terminal etc.
# aptitude search fcitx (should be autoremoved as well) # aptitude search zhcon -> if found: # apt purge fcitx zhcon # sudo apt purge xiterm+th* # sudo apt autoremove # sudo apt purge mlterm mlterm-tiny # sudo apt autoremove # sudo apt purge im-config # sudo apt autoremove
Remove fonts
It's hard to give advice on this as some will want many fonts Your fonts directory is: /usr/share/fonts - check disk usage # du -h /usr/share/fonts/ - - sorted view # du -h --max-depth=2 /usr/share/fonts/ | sort -hr - count number of files # find /usr/share/fonts/ -type f | wc -l - you may delete folders with 'rm -r' (no example provided) - then rebuild font cache # fc-cache -rv
Remove Libre Office
This may award you with 380-450MB of extra disk space. For lightweight replacements see below. To remove Libreoffice, first simulate, and make sure you will not remove anything really important (chances are low, but still): # sudo apt -s purge libreoffice* - if it looks legit, repeat without the "-s". Then: # sudo apt autoremove - watch the messages afterwards. You may still have to: # sudo rm -r /etc/libreoffice/registry # sudo rm -r /usr/share/fonts/truetype/libreoffice
Remove "accessibility tools"
You may also want to remove "accessibility tools" if you do not need them. One example is 'orca' (screen reader. If activated it will read out loud(!) whatever is on your screen): # sudo apt purge orca
Last, remove undeleted config files/folders
The deletes above may have left a lot of undeleted config files that are no longer required. - to list them: # aptitude search ~c - to delete them: # sudo aptitude purge ~c This will produce a lot of messages. Some will be like this: dpkg: warning: while removing fonts-telu-extra, directory '/usr/share/fonts/truetype/fonts-telu-extra' not empty so not removed - open a new teminal window in order to keep those messages visible - next, examine the directory contents in the new terminal # ls -la /usr/share/fonts/truetype/fonts-telu-extra - and delete # sudo rm -r /usr/share/fonts/truetype/fonts-telu-extra ------------------------------------------------------------------------

INSTALL THE ABSOLUTE ESSENTIALS

On first internet connection, run: - update package lists # sudo apt update - install bug-warnings on updates # sudo apt install apt-listbugs - below should be installed after locale configurations (see above) # sudo apt install localepurge - last: # sudo apt upgrade -------------------------------------------------------------------------

FIREFOX, INITIAL/BASIC HARDENING

Do this now because you may want to search the www soon. Out-of-the-box Firefox is an offensive and privacy invading browser. Not the worst there is, but still. You will often meet the statement that it can be made (more) private or that it can be (somewhat) hardened. What this statement really means is that it is certainly not so per default and that you will need to spend lots of time on work to make it less offensive, effectively sabotaging several built-in functions. You may want to install an alternative web browser (see link bottom of section) to browse for information to assist you while configuring Firefox. Or, to replace Firefox altogether.
Configure Firefox: Privacy and security settings
Before you start Firefox for the first time, install this: # sudo apt install webext-ublock-origin-firefox then: - go OFF-LINE before you start Firefox for the first time! - while off-line: - configure uBlock Origin - configure below security and privacy settings: > about:permissions > about:config I could offer recommendations but I won't as it's a minefield. Some starting points here: - https://avoidthehack.com/firefox-privacy-config - https://proprivacy.com/privacy-service/guides/firefox-privacy-security-guide
Install hardening browser plugins
- on first time online on FF, you should visit no web site at all. The only thing you should do is to select "Extensions" in the menu and install+configure relevant privacy extensions - Add adblock + decentraleyes/similar, etc: https://jshelter.org/ https://privacybadger.org/ Duck Duck Go Browser Extension https://duckduckgo.com/app Firefox extension urls https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes/ https://addons.mozilla.org/en-US/firefox/addon/noscript/ https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/ https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/ https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/ - You may want to try "Librefox" - a set of hardening configurations for an existing Firefox install https://awesomeopensource.com/project/intika/Librefox - Other, perhaps useful, Firefox plugin urls: (some will also have a version for other browsers) https://addons.mozilla.org/en-US/firefox/addon/web-developer/ https://addons.mozilla.org/en-US/firefox/addon/right-click-link/ - then remember to search for a new web search provider and add at least a few different ones. Search engine suggestions (alphabetical order): (not all are privacy-focused, some so more by claim than by action) - https://search.brave.com/ - https://duckduckgo.com/ - https://www.ecosia.org/ - https://fireball.de/ - https://searx.space/ - https://www.startpage.com - https://www.qwant.com/ Here are a few starting points regarding search and privacy: https://restoreprivacy.com/private-search-engine/ - please use this link as part of your research, not as all of it - then clear history, shutdown/restart FF, whatever you prefer. - only AFTER performing these steps should you visit the first web site using Firefox. This section and the fact that there are several privacy-oriented browser alternatives should give you a hint that the main focus of Firefox is not your privacy, although it is not even among the worst there is. Also, Firefox is not even close to being lightweight. Some suggestions for browsr alternatives are found here: List: Alternative Browsers for Linux (for Lightweight and Privacy) https://clsc.net/tools/light-linux-browsers-and-privacy.php Note: This section is kept short. Still, you will want to spend some time on each of these steps. You may even want to first download an alternative web browser to assist you in making informed decisions! I should add that this section is only included because Firefox is the only browser installed per default by Debian. Detailled advice on browser choice and -hardening is really outside the scope of this text. ------------------------------------------------------------------------ ------------------------------------------------------------------------

PART 2: OPTIONAL SUGGESTIONS

Everything below is suggestions only. These are not random suggestions. Only really useful stuff has been included. Note: In some cases more than one tool for the same general type of task is listed. Use judgement: You should not install everything on the list below. Several sections may be skipped entirely. General tip: To see information about a package before you install, use one of these: # apt show name-of-package # aptitude show name-of-package (you can list several pakages on one line, separated by space) ------------------------------------------------------------------------ ------------------------------------------------------------------------ EVERYTHING BELOW IS SUGGESTIONS ONLY, NOT RECOMMENDATIONS NOTHING BELOW IS REQUIRED FOR YOUR SYSTEM TO WORK YOU MAY SAFELY SKIP ANY OR ALL OF IT IF IN DOUBT ------------------------------------------------------------------------ ------------------------------------------------------------------------

APPLICATIONS AND UTILITIES

General purpose software
- calculator # sudo apt install galculator - vlc player (to play any kind of movie file. Caveat: 85MB) # sudo apt install vlc - midnight commander (terminal dual-pane file-manager) # sudo apt install mc - meld (compare files and folders) # sudo apt install meld - deluge bittorent client (note: there are alternatives and this is not the most lightweight) # sudo apt install deluge - xdotool is a commandline tool to simulate keystrokes and mouse clicks. Often used in scripts, and some software may require it for eg. some window-handling operations. If you don't see your need for it don't install. Software that rely on it will tell you on install. # sudo apt install xdotool
Office Apps (spreadsheets, documents)
If you basically just need to use spreadsheets and word-processing, install abiword and gnumeric in stead. Both are lightweight and they will work with MS Excel and MS Word # sudo apt install gnumeric abiword
Image utilities
- lightweight image manager (for gui) # sudo apt install geeqie - lightweight image viewer (for gui) - may replace Ristretto # sudo apt install gpicview (note: if on xfce, do not uninstall Ristretto as it will remove essential stuff also) - lightweight image viewer (for gui/terminal) # sudo apt install feh - take screenshot from cmdline # sudo apt install scrot - commandline/gui image editing # sudo apt install imagemagick - - and/or a faster alternative for some conversion types (see: https://exactcode.com/opensource/exactimage/) # sudo apt install exactimage - find image duplicates # sudo apt install findimagedupes - simple drawing program, like windows paint # sudo apt install xpaint - command-line image creation / drawing tool # sudo apt install flydraw
Photo/graphics programs
Just a few suggestions (note: large programs + downloads) - gimp photo/image editing + raw format handling + extras # sudo apt install gimp rawtherapee gimp-plugin-registry gimp-data-extras (above is >80Mb download and ~350Mb on disk) - inkscape vector based drawing # sudo apt install inkscape (above is ~24MB download and ~120 MB on disk)
Password manager alternatives
Here are a few alternatives to choose from: bypass, cpm, gnome-passwordsafe, gokey, impass, pass, password-gorilla, passwordsafe, pwman3, revelation, ylva ... - check out before install: eg: # apt show revelation Make sure to select one that is simple and does not offer features that you don't know if you want or not. Just the basics please. Also, you may want to research the name in a search engine before install. You may want to run a simulated install, to check what happens before actually installing eg: # apt-get -s install revelation
Alternative web browsers
This section is now a separate page in order to make this list a bit more lightweight. List: Alternative Browsers for Linux (for Lightweight and Privacy) https://clsc.net/tools/light-linux-browsers-and-privacy.php
E-mail
This section is now a separate page in order to make this list a bit more lightweight. List: Alternative Email Clients for Linux https://clsc.net/tools/email-clients-linux.php ------------------------------------------------------------------------

SYSTEM TOOLS

Mobile broadband, wifi, ethernet
-for mobile broadband use "network-manager" + "modemmanager" + "ppp" # sudo apt intall network-manager modemmanager ppp - it will work with Wi-Fi and cable as well bluetooth support (if desired, and not installed) # sudo apt install bluez bluez-obexd
Utilities
- kill a window # sudo apt install xkill - disk mount without password # sudo apt install udevil - synaptics touchpad settings tool (only relevant if you have one) # sudo apt install xorg-driver-synaptics - various file formats (for all kinds of use, eg. file managers etc) # sudo apt install mime-support file arj bzip2 unar zip unzip unrar lz4 lz4json
Firmware updates
- on older hardware you may need firmware updates, eg to make wifi work. This may require a bit of research. Some starting points: https://wiki.debian.org/Firmware https://wiki.debian.org/Firmware/Updates https://packages.debian.org/search?suite=all&searchon=all&keywords=firmware+update This process will be specific to your hardware, and it may be less than straightforward. A good helper may be to input any specific error message into a search engine. Also, you may want/need to use the System information tools section.
Software installers
- aptitude # sudo apt install aptitude - debian package installer # sudo apt install gdebi - synaptic graphical package manager # sudo apt install synaptic - FlatPak (https://www.flatpak.org/) # sudo apt install flatpak - Snap (https://snapcraft.io/) # sudo apt install snapd - Discover (https://apps.kde.org/discover/) (has backends for flatpak+snap+fwupd) # sudo apt install plasma-discover - AppImage (https://appimage.org/) - - dl: https://appimage.github.io/
System information tools
- ifstat: interfaces # sudo apt install ifstat - inxi: config info (https://smxi.org/docs/inxi.htm) # sudo apt install inxi - hardware info GUI tool (a.k.a. "System profiler and benchmark") - - https://manpages.debian.org/bullseye/hardinfo/hardinfo.1.en.html - - https://screenshots.debian.net/package/hardinfo # sudo apt install hardinfo
Enhanced terminals
- tilda: top-of-screen terminal (https://github.com/lanoxx/tilda) # sudo apt install tilda - terminator (https://gnome-terminator.org/)wa # sudo apt install terminator - tmux terminal multiplexer (https://github.com/tmux/tmux) # sudo apt install tmux
System monitors and top variants
- top variants # sudo apt install iotop htop atop # sudo apt install iftop # sudo apt install nethogs # sudo apt install jnettop - conky: desktop live monitor (https://en.wikipedia.org/wiki/Conky_(software) # sudo apt install conky (on some systems it is "conky-all")
Disk management
- 'parted' partition editor ('partx' probably already installed) # sudo apt install parted - - or: gparted # sudo apt install gparted gpart - - - or: disk tools # sudo apt install fdisk - - - - or full system utilities collection (includes 'fdisk') # sudo apt install linux-utils - backup partitions into a compressed image file # sudo apt install partimage
System Protection
Here, just a single suggestion as if you are used to working with these things you may already have your own favourites (or, your job may require something specific): - Firejail sandboxing (https://firejail.wordpress.com) # sudo apt install firejail You will find more suggestions if you search for terms like "virtual machines" / "VMs", "sandboxing", "provisioning and orchestration", "firewall", "system hardening" ... This may easily lead to lots of time spent, though.
WWW and network tools
- net-tools (eg 'ifconfig' -deprecated, now replaced by 'ip') # sudo apt install net-tools - 'whois', 'ping', etc... # sudo apt install whois iputils-ping iputils-tracepath traceroute - 'dig' and 'nslookup' # sudo apt install dnsutils - 'curl' and 'wget' # sudo apt install curl # sudo apt install wget
Network/connection analysis tools (skip if in doubt)
Note: These are separate tools, put on one line for brevity only. This is not a recommendation to install any of them, especially not to install all of them in one batch! Don't worry: If you're not sure if you need these you will certainly not need any of them and you will not miss them. So, just skip this: # sudo apt install arp-scan arping tcpdump nmap ------------------------------------------------------------------------

DEVELOPER TOOLS AND PROGRAMS

Development tools
- geany lightweight IDE (https://geany.org/) + virtual terminal # sudo apt install geany libvte9 - git (https://git-scm.com/) # sudo apt install git - graphical FTP client # sudo apt install filezilla If you regularly do development or programming please install your favourites. Above few suggestions are only intended to get you productive fast.
PHP, MariaDB, and PhpMyAdmin
# sudo apt install php # sudo apt install mariadb-common mariadb-server php-mysql # sudo apt install phpmyadmin - useful extensions (some may be recommends or required by above) # sudo apt install php-pear php-json php-mbstring php-intl # sudo apt install mcrypt libmcrypt-dev php-imagick libmagickcore-6.q16-6-extra # sudo apt install php-gmp php-gd
Configure PHP and mysql/mariadb
(Optional line for working with international character sets etc.) # sudo phpenmod intl Enable mysql (MariaDM) in PHP # sudo phpenmod mysqli Setup MariaDB installation # sudo mysql_secure_installation # sudo service mysql restart # sudo service mysqld restart
Set SQL admin password (if not already set)
- - login # mysql -u root - - or # sudo mysql -u root - - when logged in > SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your password'); > flush privileges; > \q
Login to SQL, check everything went okay.
# sudo mysql -u root -p - or # mysqladmin -u root -p (above will just display help text and exit) check status of mysql service # sudo systemctl status mysql.service ------------------------------------------------------------------------

LOCALHOST WEB SERVER

Install web server (Lighttpd or Apache)
To keep the system lightweight, install the web server Lighttpd. Besides being lightweight it is also easy to configure. It will do anything you expect a web server to do on a local PC, and fast. - to install Lighttpd (with PHP installed and enabled): # sudo apt-get install lighttpd php-common php-cgi # sudo lighty-enable-mod fastcgi-php If you need to install Apache2 in stead the process is more complicated, see the separate guide: Install and Configure Apache on a Linux PC (as localhost) apache-linux-localhost.php
Add your user to the group "www-data"
- first, check if you are in that group already # groups - in below line replace "user" with your user name # sudo usermod -a -G www-data user
Configure localhost folders
-set user, group # sudo chown -R www-data:www-data /var/www/ - set permissions # sudo chmod -R ug=rwx /var/www - - or # sudo chmod -R 770 /var/www/ -link phpMyAdmin into folder, if installed: # sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin - control # ls -lh /var/www/ A fast and simple way to serve a folder of web content on localhost is by using a symbolic link: Say you have a web site in your folder "~/website", then below line will make your "~/website" folder appear in a browser on the URL "http://localhost/website/": # ln -s /home/username/website /var/www/html/website (Note: "username" should be your user name, replace it first) ------------------------------------------------------------------------ ------------------------------------------------------------------------

PART 3: APPENDICES

------------------------------------------------------------------------ ------------------------------------------------------------------------

APPENDIX: Before you install anything, simulate

Run a simulated install to get an idea of what will happen, before you do an install. Just a tip. These two works the same way (shows complete process, but no download or disk usage sizes) # sudo apt install -s example_software_name # sudo apt-get install -s example_software_name This one provides download size and disk usage size (but does not show suggested packages) # sudo aptitude install -s example_software_name
Install "apt-listbugs"
You will want to be notified of grave bugs before you install some package that ruins your system. This was already mentioned above, under "Essential Installs", so to repeat: # sudo apt install apt-listbugs This package gives you the option to abort the install process before you ruin your system.

APPENDIX: Installing from "backports"

If a package is not yet available in the stable version, it may be available in "backports". Assuming you have added "backports" to your "sources.list" file, this is how to search and install packages. The package "wicd" is used as an example: # sudo apt update # aptitude -t bullseye-backports search wicd - or # apt -t bullseye-backports search wicd - if found, install: # sudo apt -t bullseye-backports install wicd (Note: "wicd" is a network manager. Do not install it if you use mobile broadband, as it will not work with that.) ------------------------------------------------------------------------ ------------------------------------------------------------------------

END OF LIST. THE FUN STARTS HERE.

This would be a good time to actually USE that 'partimage' utility you read about above, but forgot to install. But then you could also 'dd', 'rsync', or whatever you prefer. ------------------------------------------------------------------------ At this point you should install your favorite media players, games, special purpose programs, desktop environments, window managers, and whatnot. These types of things are not included. The focus is on quickly getting a basic lightweight work-ready system up and running. After finishing this list you will be able to get things done. (Top of list) (Table of Contents)

 

 


Document URL: http://clsc.net/tools/linux-todo-after-install.php