Skip to content

Instantly share code, notes, and snippets.

@newtolinux23
Created July 4, 2024 20:29
Show Gist options
  • Save newtolinux23/3c76c30e25dc5814bdbd8fe6288ef83b to your computer and use it in GitHub Desktop.
Save newtolinux23/3c76c30e25dc5814bdbd8fe6288ef83b to your computer and use it in GitHub Desktop.
Things to Do After Installing Fedora 40 (script)
title date description tags ShowReadingTime
Things to Do After Installing Fedora 40 (script)
2024-06-15
Fedora 40
fedora
linux
True

Fedora 40 Setup Script

Open a Terminal: Open a terminal on your Fedora 40 system.

Create the Script: Use a text editor like nano to create a new script file.

sudo nano fedora_setup.sh

Write the Script: Copy and paste the following code into the text editor.

#!/bin/bash
# Fedora 40 Setup Script

echo "Starting Fedora 40 setup..."

# Update the system
echo "Updating system..."
sudo dnf update -y

# Install essential software
echo "Installing essential software..."
sudo dnf install -y vim git curl wget htop gnome-tweaks

# Enable RPM Fusion repositories
echo "Enabling RPM Fusion repositories..."
sudo dnf install -y \
  https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
  https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

# Install multimedia codecs
echo "Installing multimedia codecs..."
sudo dnf groupupdate -y multimedia --setop="install_weak_deps=False" \
  && sudo dnf groupupdate -y sound-and-video

# Install Flatpak and add Flathub repository
echo "Installing Flatpak and adding Flathub repository..."
sudo dnf install -y flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# Install GNOME Extensions app
echo "Installing GNOME Extensions app..."
sudo dnf install -y gnome-shell-extension-prefs

# Set up the firewall
echo "Setting up the firewall..."
sudo systemctl enable --now firewalld
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload

# Clean up
echo "Cleaning up..."
sudo dnf autoremove -y
sudo dnf clean all

echo "Fedora 40 setup complete! Please restart your computer to apply all changes."

# Save and Exit: Save the file and exit the text editor (in nano, you can do this by pressing Ctrl+X, then Y to confirm, and Enter to save).

# Make the Script Executable: Change the permissions of the script to make it executable.

chmod +x fedora_setup.sh

# Run the Script: Execute the script to perform the setup tasks.

./fedora_setup.sh

This script simplifies the initial setup process for a new Fedora 40 installation, making it easier for beginners to get started with their system.

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