Other (Miscellaneous Stuff) - Updated May 2, 2022
Handy Commands
Updates...
sudo apt update # Fetches the list of
available updates
sudo apt upgrade #
Installs some updates; does not remove packages
sudo apt
full-upgrade # Installs updates; may also remove
some packages, if needed
sudo apt autoremove #
Removes any old packages that are no longer needed
or
sudo apt update && sudo apt upgrade -y
How do I upgrade to a newer version of Ubuntu?
sudo do-release-upgrade -d
pop-upgrade release upgrade
Neofetch is a command-line system
information tool written in bash 3.2+. Neofetch displays information
about your operating system, software and hardware in an aesthetic and
visually pleasing way.
sudo apt install neofetch
PDF Mix Tool is a simple, lightweight open-source PDF
editing application that lets you extract pages from PDF, merge two
PDFs, delete pages from PDF files among a few other things.
https://scarpetta.eu/pdfmixtool/
sudo
snap install pdfmixtool
Shutdown, Reboot and Run Levels
sudo reboot
sudo shutdown -r
init 6
0 - Power off the
machine
1 - Enter rescue mode
2,3,4,5 - Start runlevelX.target unit
View Detailed Laptop Battery Report
upower -i
`upower -e | grep 'BAT'`
upower -i $(upower -e | grep BAT) | grep
--color=never -E "state|to\ full|to\ empty|percentage"
cat
/proc/driver/rtc | grep batt
How do I identify which Linux
distro is running, and other information
cat /etc/issue
hostnamectl
lsb_release -a
Disable UTC and use Local Time in Ubuntu
timedatectl set-local-rtc 1 --adjust-system-clock
Server Message Block is a network
communication protocol for providing shared access to files, printers,
and serial ports between nodes on a network.
smb://server
List, install and remove Snaps
SNAP TIPS from
Popey
https://popey.com/blog/2020/12/snap-tips/
sudo snapd
snap list
sudo
snap install bluemail
sudo snap remove bluemail
Linux Mint
does not make snapd available out of the box. Mint will not allow snapd
to be installed. To get around this limitation run the following
command.
sudo rm /etc/apt/preferences.d/nosnap.pref
How to get rid of the system crash popup in Ubuntu Linux
ls -l /var/crash/
sudo rm /var/crash/*
How to Clear Apt Cache and Reclaim Precious Disk Space
sudo du -sh /var/cache/apt/archives
sudo apt clean
How long does your Linux system take to boot?
systemd-analyze
sudo systemd-analyze blame
sudo systemd-analyze
blame | head
systemd-analyze critical-chain
Linux History Command
history
history -c
history -w
How to Mount and Use an exFAT Drive on Linux
sudo apt update
sudo apt install exfat-fuse exfat-utils
Install Microsoft Core Fonts in Ubuntu
sudo apt
install ttf-mscorefonts-installer
How do I find the running GUI environment from the terminal?
echo $XDG_CURRENT_DESKTOP
Resetting Grub Bootloader using a Live USB drive
Boot Ubuntu Live USB
CTRL+ALT+T
sudo fdisk -l
sudo blkid
sudo mount /dev/sda1 /mnt
sudo grub-install
--boot-directory=/mnt/boot /dev/sda