Below is a list of random Debian based Linux information for my reference. This info also includes some fixes for Raspberry Pi specific related issues
Random Linux Information
001 Install Nala (apt frontend)
Desktop:
- sudo apt install nala
002 What apps are useful for a New (clean) Install
Desktop:
Web Server:
- sudo apt install nala
- sudo nala install fonts-noto-color-emoji neofetch conky 7zip rclone tree traceroute inkscape netsurf-gtk rpi-imager vlc gparted keepassxc audacious ansiweather w3m lynx psensor code
- sudo nala install flatpak
- flatpak install --user https://flathub.org/beta-repo/appstream/org.gimp.GIMP.flatpakref
- sudo nala install snapd
- snap install core snap-store x16emu
Web Server:
- sudo apt install nala
- sudo nala install php certbot neofetch fonts-noto-color-emoji 7zip
003 Terminal
Use the following key-presses to open a terminal window
- Crtl + Alt + T
004 Software update & Tidy up
Use the following commands in a terminal window to update Linux to the latest software
- sudo apt update
- sudo apt upgrade
- sudo apt -y autoremove && sudo apt -y clean && sudo apt -y purge ?config-files
005 Apache server
To start Apache, the command would be
- sudo systemctl start apache2
- sudo systemctl stop apache2
- sudo service apache2 restart
- sudo nano /etc/apache2/sites-enabled/000-default-le-ssl.conf
- sudo nano /etc/apache2/sites-enabled/000-default.conf
006 Journal files (journalctl)
Use the following command in a terminal window to clear out all journal files older than 1 day
- sudo journalctl --vacuum-time=1d
- sudo journalctl --vacuum-size=1B
- journalctl --disk-usage
- systemctl disable systemd-journald
007 Location of script files
Scripts can be placed in the following directory so you don't have to include the full path
- /usr/local/bin
008 Network Manager
To stop use the following
- sudo systemctl stop NetworkManager.service
- sudo systemctl start NetworkManager.service
- sudo systemctl restart NetworkManager.service
009 Stop audio setting defaulting to headphones
Use the following (for Ubuntu 22.04 LTS)
- sudo nano /etc/pulse/default.pa
010 Scrambled online accounts screen
Use the following in terminal to open the settings with the screens unscrambled
- WEBKIT_DISABLE_COMPOSITING_MODE=1 gnome-control-center
011 Stop polling for an SD card constantly when not using one
Edit config.txt
- sudo nano /boot/firmware/config.sys
- dtparam=sd_poll_once
012 Get the CPU temparature
Use the following command:
- cat /sys/class/thermal/thermal_zone0/temp
013 *.desktop file, allow launching
Use the following command:
- gio set file.desktop metadata::trusted true
014 Add *.desktop file to launcher and/or menu
Copy the *desktop file into the following folder:
- ~\.local\share\applications
015 Turn off splash screen
Edit the following file:
- sudo nano /boot/firmware/cmdline.txt
- quiet splash
016 Backup / Restore entire HDD using command line (Terminal)
Backup:
- dd if=/dev/sda of=./part1.image
- ddd if=./part1.image of=/dev/sda
017 Compressed backup to img file using command line (Terminal)
Backup:
- cd ~
- sudo dd if=/dev/<drive> | gzip -c - > <name>.img.gz
018 Login screen settings
Use the following to edit the settings:
- sudo nano /etc/gdm3/greeter.dconf-defaults
- cursor-size=64
- text-scaling-factor=1.50
- clock-format='12h'
019 ALT + F2 to open Run.. dialogue | Wayfire
Add the following into the file ~/.config/wayfire.ini at the bottom of the [command] section:
- binding_power = <alt> KEY_F2
- command_power = sh -c "$(zenity --entry --title='Run' --text='Enter Command')"
020 Configure Network Manager from CLI | Bookworm
Use the following command:
- nmtui
021 Auto udate CertBot using cron
Use the following command to create a cron job:
- sudo touch /etc/cron.d/certbot
- sudo nano /etc/cron.d/certbot
- # /etc/cron.d/certbot: crontab entries for the certbot package
#
# Upstream recommends attempting renewal twice a day
#
# Eventually, this will be an opportunity to validate certificates
# haven't been revoked, etc. Renewal will only occur if expiration
# is within 30 days.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
022 Show network information
Use the following command (change eth0 for the device you're interested in):
- nmcli device show eth0
023 Check firmware is up to date
Use the following command:
- sudo rpi-eeprom-update
024 Stop / Start a package from updating via apt
Use the following commands:
- sudo apt-mark hold package-name
- sudo apt-mark unhold package-name
- sudo apt-mark showhold
025 numlock on at system start
Use the following command to install the app numlockx:
- sudo nala install numlockx