grubby --default-index
ORgrubby --default-kernel
grubby --set-default-index=0
ORgrubby --set-default-kernel=$path_to_kernel_file
- Kernel files are found here:
/boot/vmlinuz-<version>
After making changes to /etc/default/grub
you need to run grub2-mkconfig
for changes to be written to the grub.cfg file.
- Fedora
sudo grub2-mkconfig -o $boot_partition/$boot_dir_name/fedora/grub.cfg
- Find out where boot partition is mounted using
lsblk
ordf
- e.g. if
/dev/sda1
is mounted at/boot/efi
and there is subdirectoryEFI
under it, then:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
sudo lshw -short
sudo dmidecode
- more details (Desktop Management Interface)
sudo lshw -businfo | grep cpu
- shortest CPU description
lscpu
- CPU overview
cat /proc/cpuinfo
- Details for each core
sudo dmidecode -t processor
- CPU details
lspci -vnn | egrep -i vga|3d
sudo lshw -businfo | grep disk
- Disk size and model
lsblk -pf
- Get info about all block devices (-p: paths; -f: filesystems label and UUID)
df -h
- Get the size of partitions (-h: human readable)
sudo fdisk -l
- list partitions with more details
sudo dnf install ncdu
ncdu $path_to_directory
- NCDU app for displaying disk usage
lsusb
: simple short list of USB deviceslsusb -t
: in a tree formatlsusb -tv
: in a tree format with vendor and product IDs
ip addr
: list of network interfaces with their IP addressesip link
: list of network interfacesip link show
: show details of network interfacesip link set dev <interface> up
: bring up interfaceip link set dev <interface> down
: bring down interface
free
: show memory usage in bytesfree -mh
: show memory usage in MegaBytes and in human readable formatcat /proc/meminfo
: show memory usage in human readable format
BluetoothCtl:
bluetoothctl
: A tool in the BlueZ packagepower on
agent on
default-agent
scan on
trust <deviceuuid>
pair <deviceuuid>
connect <deviceuuid>
HCI tool:
hcitool dev
hci -i <dev> scan
- To be added
General
- Copy any font file e.g. in .ttf or .otf format to the fonts folders
usr/share/fonts
or/usr/local/share/fonts
- To make sure it is available for all users, run:
fc-list
- To update the cache for programs like libre office, run:
fc-cache
- To get the current font used by the terminal, run:
gsettings get org.gnome.desktop.interface monospace-font-name
- In Gnome, can use Tweaks application to change the font.
- To change the font in the terminal, run:
gsettings set org.gnome.desktop.interface monospace-font-name $font_name
Use Nerd-Fonts
- Install fontforge
sudo dnf install fontforge
- you can also use fontforge to view the content of the font file and make adjustments
-
Create a folder and make sure it contains the following items
-
Run the following command to patch a font file
fontforge -script font-patcher -c -w --careful -out $output_directory $font_file_path
-c
: Complete; meaning patch all glyphs like fontawesome, octicons, codicons, etc. to the font file-w
: Windows Compatible; Make the font name short so it can be used in Windows as well.--careful
: Do not overwrite an already patched character
- Fedora Docs
less /etc/passwd
: get a list of all users and their default shellless /etc/group
: get a list of all available groupsgroups
: get a list of groups the user is actively part ofgroups <user>
: get a list of groups user is assigned to - might need re-log in for newly assigned ones to take effectsudo passwd
: change passwordsudo useradd
: add usersudo userdel
: delete usersudo usermod
: modify usersudo usermod -aG <group> <user>
: add user to group e.g. wheel, libvirt or docker
- Fedora Docs
sudo chmod
: change permissionssudo chmod -R u+rwX,go-w
: recursively (-R) add read/write/execute permissions to user only; for group and others only remove write permissionsudo chmod 753 <file>
: set permissions as rwx for user, r-x for group and -wx for others
sudo chown
: change ownership
- Fedora Docs
sudo firewall-cmd --list-all
: list all firewall rulessudo firewall-cmd --zone=public --list-ports
: list all portssudo firewall-cmd --zone=public --add-service=<service>
: add servicesudo firewall-cmd --zone=public --remove-service=<service>
: remove servicesudo firewall-cmd --zone=public --add-port=<port>/<protocol>
: add portsudo firewall-cmd --zone=public --remove-port=<port>/<protocol>
: remove port
sudo dnf update
: update all packagessudo dnf upgrade
: upgrade all packagessudo dnf install <package>
: install packagesudo dnf remove <package>
: remove packagesudo dnf clean all
: clean all packagessudo dnf autoremove
: remove all packages that are no longer neededsudo dnf history list
: list all packages installedsudo dnf history info <package>
: show details of packagesudo dnf history undo <package>
: undo package installation- Additional Repositories
- RPM Fusion Repositories
- Fedora-Docs
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
: RPM Fusion Free Repositorysudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
: RPM Fusion Non-Free Repository
- Ad-hoc Repositories
- Fedora Docs
sudo dnf config-manager --add-repo <repo_url>
: add repositorysudo dnf config-manager --set-enabled <repo_name>
: enable repository
- RPM Fusion Repositories
General
- vim: vim text editor
- pytop: top command
- ncdu: NCdu disk usage
- wireshark: network sniffer
- nmap: nmap network scanner
- neofetch: Get system info
- Citrix: Citrix Workspace
- ICAClient: Citrix ICAClient client
- timeshift: Backup and restore linux - excluding personal directories
- dnfdragora: A package-based graphical frontend for Dnf
- rambox: All-in-one messaging and email client
- bleachbit: Remove unwanted files and clean up the system
- stacer: System monitoring and cleaning utility - view all startup programs, services, disk usage, and more
Gnome Extensions
- GSConnect: Connect with an android phone - for gnome desktops
- Vitals: System Performance Monitoring
- Clipboard History
- Impatience: Adjust Gnome animations time
- Screenshot Tool
- Extension List: Quick access to all installed extensiions
- Bluetooth Quick Connect
- Hide Activities Button
Flatpaks
- General
- Add flathub repository:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- Run flatpak:
flatpak run <flatpak_id>
- Add flathub repository:
- Applications:
- onlyoffice-desktopeditors: OnlyOffice desktop editors
flatpak install flathub org.onlyoffice.desktopeditors
: Install OnlyOffice desktop editors
- vscode: Visual Studio Code
flatpak install flathub com.visualstudio.code
: Install Visual Studio Code
- onlyoffice-desktopeditors: OnlyOffice desktop editors
Snaps
- General
- Install Snap:
sudo dnf install snapd
- Install Snap:
- Install Snap Packages:
- Sosumi:
sudo snap install sosumi
- Sosumi:
- Fedora Docs
sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel
sudo dnf install lame\* --exclude=lame-devel
sudo dnf group upgrade --with-optional Multimedia
- Fedora Docs
sudo timedatectl set-timezone Australia/Melbourne
: set timezone
localectl status
: show current localelocalectl list-locales
: list all localessudo localectl set-locale LANG=en_AU.utf8
: set locale to Australian English and UTF-8 encodinglocalectl list-keymaps
: list all keymapslocalectl set-keymap us
: set keymap to US
sudo dnf groupinstall --with-optional virtualization
sudo dnf groupinstall "Development Tools"