Skip to content

Instantly share code, notes, and snippets.

@yokoffing
Last active November 11, 2024 03:00
Show Gist options
  • Save yokoffing/3f36b995461c443844a5517fc271ca23 to your computer and use it in GitHub Desktop.
Save yokoffing/3f36b995461c443844a5517fc271ca23 to your computer and use it in GitHub Desktop.
Fedora setup

Fedora GNOME setup

Mostly to help me keep track of my doings in Linux Fedora.

Context

             .',;::::;,'.                 yokoffing@my-fedora
         .';:cccccccccccc:;,.             -------------------
      .;cccccccccccccccccccccc;.          OS: Fedora Linux 40 (Workstation)
    .:cccccccccccccccccccccccccc:.        Host: 2020 XPS 15 9500
  .;ccccccccccccc;.:dddl:.;ccccccc;.      Kernel: Linux 6.9.12-200.fc40.x86_64
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.     Uptime: 16 hours, 20 mins
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.    Packages: 2182 (rpm), 6 (flatpak)
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,    Shell: bash 5.2.26
:cccccccccccccc;MMM.;cccccccccccccccc:    Display (SHP14D1): 1920x1200 @ 60 Hz ]
:ccccccc;oxOOOo;MMM000k.;cccccccccccc:    DE: GNOME 46.3.1
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;    WM: Mutter (Wayland)
ccccc;XMO';cccc;MMM.;cccccccccccccccc'    WM Theme: Adwaita
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;     Theme: Adwaita [GTK2/3/4]
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;      Icons: Adwaita [GTK2/3/4]
cccccc;dNMWXXXWM0:;cccccccccccccc:,       Font: Inter (11pt) [GTK2/3/4]
cccccccc;.:odl:.;cccccccccccccc:,.        Cursor: Adwaita (24px)
ccccccccccccccccccccccccccccc:'.          Terminal: GNOME Terminal 3.50.1
:ccccccccccccccccccccccc:;,..             Terminal Font: Fira Code Medium (12pt)
 ':cccccccccccccccc::;,.                  CPU: Intel(R) Core(TM) i7-10750H (12)z
                                          GPU: Intel UHD Graphics @ 1.15 GHz [I]
                                          GPU: NVIDIA eForce GTX 1650 Ti Mobile [D]
                                          Memory: 4.74 GiB / 15.36 GiB (31%)
                                          Swap: 0 B / 8.00 GiB (0%)
                                          Disk (/): 26.03 GiB / 475.35 GiB (5%)s
                                          Local IP (wlp0s20f3): 192.168.0.233/24
                                          Battery: 75% [Discharging]
                                          Locale: en_US.UTF-8

Install fastfetch

Fastfetch is a replacement of neofetch, which is now depreciated.

sudo dnf install fastfetch
fastfetch

Make DNF faster

sudo gnome-text-editor /etc/dnf/dnf.conf

Add this text:

max_parallel_downloads=20
fastestmirror=True

Update

Programs

sudo dnf update -y && sudo dnf upgrade -y

Then reboot, if needed.

Change hostname

https://itsfoss.com/things-to-do-after-installing-fedora/#6-change-hostname-after-installation

RPM Fusion

Needed?

Installing plugins for playing movies and music

Multimedia

Needed?

Gstreamer applications

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 groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

H264

sudo dnf config-manager --set-enabled fedora-cisco-openh264
sudo dnf install -y gstreamer1-plugin-openh264 mozilla-openh264

Includes tinkering with Firefox: https://docs.fedoraproject.org/en-US/quick-docs/openh264/

NVIDIA Drivers

I need these for my dGPU. Source: https://github.com/gridhead/nvidia-auto-installer-for-fedora-linux

sudo dnf install dnf-plugins-core -y
sudo dnf copr enable t0xic0der/nvidia-auto-installer-for-fedora -y
sudo dnf install nvautoinstall -y

Then run:

sudo nvautoinstall rpmadd
sudo nvautoinstall driver
sudo nvautoinstall nvrepo
sudo nvautoinstall plcuda

Alternative

sudo dnf update # Update the system first, the drivers may not work right if you don't.
sudo dnf install akmod-nvidia # Install the NVIDIA kernel module.

Intel drivers

I need these for my iGPU.

sudo dnf install libheif-freeworld.x86_64
sudo dnf swap libavcodec-free libavcodec-freeworld
sudo dnf swap ffmpeg-free ffmpeg

Check drivers

Restart, then:

# Check video drivers in use
lspci -n -n -k | grep -A 2 -e VGA -e 3D

# Check active GPU driver
glxinfo | grep -e OpenGL.vendor -e OpenGL.renderer

# List available and default GPU
switcherooctl list

Others

sudo dnf group upgrade --with-optional Multimedia

Automatically delete trash

https://itsfoss.com/things-to-do-after-installing-fedora/#14-automatically-delete-trash-content

Install programs

Traditional

sudo dnf install -y unzip p7zip p7zip-plugins unrar
sudo dnf install -y vlc
sudo dnf install -y steam

# One line
dnf install gnome-tweak-tool steam vlc <anything>

Brave browser

See here.

Flatpak

flatpak install flathub org.videolan.VLC
flatpak install flathub com.valvesoftware.Steam
flatpak install flathub com.heroicgameslauncher.hgl
flatpak install flathub com.spotify.Client

Gnome tweaks and extensions

Run command for both Tweaks app and Extension app: https://itsfoss.com/things-to-do-after-installing-fedora/#8-install-gnome-tweaks-and-extensions-app sudo dnf install -y gnome-tweaks gnome-extensions-app

Tweaks

  • Enable min/max buttons

Extensions

Themes

Themes

Fonts

# Download font in Downloads folder


# Create a new directory
sudo mkdir -p /usr/share/fonts/font_name

# Change into the new directory
cd /usr/share/fonts/font-name

# Extract the downloaded font
sudo unzip -d . ~/Downloads/font_name.zip

# Register the font with the system
sudo fc-cache -fv

Custom DNS

DNS

Network Security

UFW

Uncomplicated Firewall (ufw) is an easy firewall to setup and understand. ufw blocks traffic and allows it via iptables.

iptables is a firewall tool that comes pre-installed on most Linux systems that allows you to control and manage the traffic going in and out of your computer or network.

iptables works by creating a set of rules that define which network traffic is allowed to pass through and which is blocked. For instance, to allow only certain types of network traffic, such as web traffic on port 80, and block everything else.

# Install UFW
sudo dnf install ufw

# SSH protocol
sudo ufw limit 22/tcp

# HTTP
sudo ufw allow 80/tcp

# HTTPS
sudo ufw allow 443/tcp

# All incoming connections will be blocked by the firewall,
# unless explicitly allowed by a previous rule
sudo ufw default deny incoming

# All outgoing connections from your system will be permitted by the firewall
sudo ufw default allow outgoing

# Enable UFW
sudo ufw enable

# Summary review
sudo ufw status verbose

Disable UFW

In case you need to: sudo ufw disable

Remove all rules

ufw reset

Delete a rule

Example: sudo ufw delete deny 80/tcp

I had an issue where ufw was disabled after restart: https://askubuntu.com/questions/1399653/ufw-disabled-inactive-on-reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment