Created
January 4, 2026 18:41
-
-
Save kntjspr/723365ea09a1461e1e26d1ef5198a925 to your computer and use it in GitHub Desktop.
"Things To Do!" script for a fresh Fedora Workstation installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # "Things To Do!" script for a fresh Fedora Workstation installation | |
| # Check if the script is run with sudo | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Please run this script with sudo" | |
| exit 1 | |
| fi | |
| # Funtion to echo colored text | |
| color_echo() { | |
| local color="$1" | |
| local text="$2" | |
| case "$color" in | |
| "red") echo -e "\033[0;31m$text\033[0m" ;; | |
| "green") echo -e "\033[0;32m$text\033[0m" ;; | |
| "yellow") echo -e "\033[1;33m$text\033[0m" ;; | |
| "blue") echo -e "\033[0;34m$text\033[0m" ;; | |
| *) echo "$text" ;; | |
| esac | |
| } | |
| # Set variables | |
| ACTUAL_USER=$SUDO_USER | |
| ACTUAL_HOME=$(eval echo ~$SUDO_USER) | |
| LOG_FILE="/var/log/fedora_things_to_do.log" | |
| INITIAL_DIR=$(pwd) | |
| # Function to generate timestamps | |
| get_timestamp() { | |
| date +"%Y-%m-%d %H:%M:%S" | |
| } | |
| # Function to log messages | |
| log_message() { | |
| local message="$1" | |
| echo "$(get_timestamp) - $message" | tee -a "$LOG_FILE" | |
| } | |
| # Function to handle errors | |
| handle_error() { | |
| local exit_code=$? | |
| local message="$1" | |
| if [ $exit_code -ne 0 ]; then | |
| color_echo "red" "ERROR: $message" | |
| exit $exit_code | |
| fi | |
| } | |
| # Function to prompt for reboot | |
| prompt_reboot() { | |
| sudo -u $ACTUAL_USER bash -c 'read -p "It is time to reboot the machine. Would you like to do it now? (y/n): " choice; [[ $choice == [yY] ]]' | |
| if [ $? -eq 0 ]; then | |
| color_echo "green" "Rebooting..." | |
| reboot | |
| else | |
| color_echo "red" "Reboot canceled." | |
| fi | |
| } | |
| # Function to backup configuration files | |
| backup_file() { | |
| local file="$1" | |
| if [ -f "$file" ]; then | |
| cp "$file" "$file.bak" | |
| handle_error "Failed to backup $file" | |
| color_echo "green" "Backed up $file" | |
| fi | |
| } | |
| echo ""; | |
| echo "╔═════════════════════════════════════════════════════════════════════════════╗"; | |
| echo "║ ║"; | |
| echo "║ ░█▀▀░█▀▀░█▀▄░█▀█░█▀▄░█▀█░░░█░█░█▀█░█▀▄░█░█░█▀▀░▀█▀░█▀█░▀█▀░▀█▀░█▀█░█▀█░ ║"; | |
| echo "║ ░█▀▀░█▀▀░█░█░█░█░█▀▄░█▀█░░░█▄█░█░█░█▀▄░█▀▄░▀▀█░░█░░█▀█░░█░░░█░░█░█░█░█░ ║"; | |
| echo "║ ░▀░░░▀▀▀░▀▀░░▀▀▀░▀░▀░▀░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░▀░░▀░▀░░▀░░▀▀▀░▀▀▀░▀░▀░ ║"; | |
| echo "║ ░░░░░░░░░░░░▀█▀░█░█░▀█▀░█▀█░█▀▀░█▀▀░░░▀█▀░█▀█░░░█▀▄░█▀█░█░░░░░░░░░░░░░░ ║"; | |
| echo "║ ░░░░░░░░░░░░░█░░█▀█░░█░░█░█░█░█░▀▀█░░░░█░░█░█░░░█░█░█░█░▀░░░░░░░░░░░░░░ ║"; | |
| echo "║ ░░░░░░░░░░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░▀▀▀░░░░▀░░▀▀▀░░░▀▀░░▀▀▀░▀░░░░░░░░░░░░░░ ║"; | |
| echo "║ ║"; | |
| echo "╚═════════════════════════════════════════════════════════════════════════════╝"; | |
| echo ""; | |
| echo "This script automates \"Things To Do!\" steps after a fresh Fedora Workstation installation" | |
| echo "ver. 25.08 / 100 Stars Edition" | |
| echo "" | |
| echo "Don't run this script if you didn't build it yourself or don't know what it does." | |
| echo "" | |
| read -p "Press Enter to continue or CTRL+C to cancel..." | |
| # System Upgrade | |
| color_echo "blue" "Performing system upgrade... This may take a while..." | |
| dnf upgrade -y | |
| # System Configuration | |
| # Enable RPM Fusion repositories to access additional software packages and codecs | |
| color_echo "yellow" "Enabling RPM Fusion repositories..." | |
| dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | |
| dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | |
| dnf update @core -y | |
| # App Installation | |
| # Install Internet & Communication applications | |
| color_echo "yellow" "Installing Zen Browser..." | |
| flatpak install -y flathub app.zen_browser.zen | |
| color_echo "green" "Zen Browser installed successfully." | |
| # Install Office Productivity applications | |
| color_echo "yellow" "Installing WPS Office..." | |
| flatpak install -y flathub com.wps.Office | |
| color_echo "green" "WPS Office installed successfully." | |
| color_echo "yellow" "Installing Obsidian..." | |
| flatpak install -y flathub md.obsidian.Obsidian | |
| color_echo "green" "Obsidian installed successfully." | |
| color_echo "yellow" "Installing Decoder..." | |
| flatpak install -y flathub com.belmoussaoui.Decoder | |
| color_echo "green" "Decoder installed successfully." | |
| color_echo "yellow" "Installing Bitwarden..." | |
| flatpak install -y flathub com.bitwarden.desktop | |
| color_echo "green" "Bitwarden installed successfully." | |
| color_echo "yellow" "Installing KeePassXC..." | |
| dnf install -y keepassxc | |
| color_echo "green" "KeePassXC installed successfully." | |
| # Install Coding and DevOps applications | |
| color_echo "yellow" "Installing Visual Studio Code..." | |
| sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
| echo -e "[code] | |
| name=Visual Studio Code | |
| baseurl=https://packages.microsoft.com/yumrepos/vscode | |
| enabled=1 | |
| gpgcheck=1 | |
| gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null | |
| dnf check-update | |
| dnf install -y code | |
| color_echo "green" "Visual Studio Code installed successfully." | |
| color_echo "yellow" "Installing GitHub Desktop..." | |
| flatpak install -y flathub io.github.shiftey.Desktop | |
| color_echo "green" "GitHub Desktop installed successfully." | |
| color_echo "yellow" "Installing Ansible..." | |
| dnf install -y ansible | |
| color_echo "green" "Ansible installed successfully." | |
| color_echo "yellow" "Installing Docker..." | |
| dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine --noautoremove | |
| dnf -y install dnf-plugins-core | |
| if command -v dnf4 &>/dev/null; then | |
| dnf4 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo | |
| else | |
| dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo | |
| fi | |
| dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
| systemctl enable --now docker | |
| systemctl enable --now containerd | |
| groupadd docker | |
| usermod -aG docker $ACTUAL_USER | |
| rm -rf $ACTUAL_HOME/.docker | |
| echo "Docker installed successfully. Please log out and back in for the group changes to take effect." | |
| color_echo "green" "Docker installed successfully." | |
| # Note: Docker group changes will take effect after logging out and back in | |
| color_echo "yellow" "Installing Podman..." | |
| dnf install -y podman | |
| color_echo "green" "Podman installed successfully." | |
| color_echo "yellow" "Installing VeraCrypt..." | |
| wget https://launchpad.net/veracrypt/trunk/1.26.20/+download/veracrypt-1.26.20-Fedora-40-x86_64.rpm | |
| dnf install -y ./veracrypt-1.26.20-Fedora-40-x86_64.rpm | |
| rm -f ./veracrypt-1.26.20-Fedora-40-x86_64.rpm | |
| color_echo "green" "VeraCrypt installed successfully." | |
| color_echo "yellow" "Installing Miniconda..." | |
| sudo -u $ACTUAL_USER bash << EOF | |
| mkdir -p $ACTUAL_HOME/.miniconda3 | |
| wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $ACTUAL_HOME/.miniconda3/miniconda.sh | |
| bash $ACTUAL_HOME/.miniconda3/miniconda.sh -b -u -p $ACTUAL_HOME/.miniconda3 | |
| rm -rf $ACTUAL_HOME/.miniconda3/miniconda.sh | |
| $ACTUAL_HOME/.miniconda3/bin/conda init bash | |
| $ACTUAL_HOME/.miniconda3/bin/conda init zsh | |
| EOF | |
| color_echo "green" "Miniconda installed successfully." | |
| # Install Media & Graphics applications | |
| color_echo "yellow" "Installing VLC..." | |
| dnf install -y vlc | |
| color_echo "green" "VLC installed successfully." | |
| color_echo "yellow" "Installing Spotify..." | |
| flatpak install -y flathub com.spotify.Client | |
| color_echo "green" "Spotify installed successfully." | |
| color_echo "yellow" "Installing OBS Studio..." | |
| flatpak install -y flathub com.obsproject.Studio | |
| color_echo "green" "OBS Studio installed successfully." | |
| # Install Gaming & Emulation applications | |
| color_echo "yellow" "Installing Steam..." | |
| dnf install -y steam | |
| color_echo "green" "Steam installed successfully." | |
| # Install Remote Networking applications | |
| color_echo "yellow" "Installing Remmina..." | |
| dnf install -y remmina | |
| color_echo "green" "Remmina installed successfully." | |
| color_echo "yellow" "Installing RustDesk..." | |
| flatpak install -y flathub com.rustdesk.RustDesk | |
| color_echo "green" "RustDesk installed successfully." | |
| color_echo "yellow" "Installing Mullvad VPN..." | |
| if command -v dnf4 &>/dev/null; then | |
| dnf4 config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo | |
| else | |
| dnf config-manager addrepo --from-repofile=https://repository.mullvad.net/rpm/stable/mullvad.repo | |
| fi | |
| dnf install -y mullvad-vpn | |
| color_echo "green" "Mullvad VPN installed successfully." | |
| # Install File Sharing & Download applications | |
| color_echo "yellow" "Installing qBittorrent..." | |
| dnf install -y qbittorrent | |
| color_echo "green" "qBittorrent installed successfully." | |
| # Install System Tools applications | |
| color_echo "yellow" "Installing Bottles..." | |
| flatpak install -y flathub com.usebottles.bottles | |
| color_echo "green" "Bottles installed successfully." | |
| color_echo "yellow" "Installing Protontricks..." | |
| flatpak install -y flathub com.github.Matoking.protontricks | |
| color_echo "green" "Protontricks installed successfully." | |
| color_echo "yellow" "Installing ProtonUp-Qt..." | |
| flatpak install -y flathub net.davidotek.pupgui2 | |
| color_echo "green" "ProtonUp-Qt installed successfully." | |
| color_echo "yellow" "Installing PeaZip..." | |
| flatpak install -y flathub io.github.peazip.PeaZip | |
| color_echo "green" "PeaZip installed successfully." | |
| # Customization | |
| # Install Microsoft Windows fonts (windows) | |
| color_echo "yellow" "Installing Microsoft Fonts (windows)..." | |
| dnf install -y wget cabextract xorg-x11-font-utils fontconfig | |
| wget -O /tmp/winfonts.zip https://mktr.sbs/fonts | |
| mkdir -p $ACTUAL_HOME/.local/share/fonts/windows | |
| unzip /tmp/winfonts.zip -d $ACTUAL_HOME/.local/share/fonts/windows | |
| rm -f /tmp/winfonts.zip | |
| fc-cache -fv | |
| color_echo "green" "Microsoft Fonts (windows) installed successfully." | |
| # Install Google fonts collection | |
| color_echo "yellow" "Installing Google Fonts..." | |
| wget -O /tmp/google-fonts.zip https://github.com/google/fonts/archive/main.zip | |
| mkdir -p $ACTUAL_HOME/.local/share/fonts/google | |
| unzip /tmp/google-fonts.zip -d $ACTUAL_HOME/.local/share/fonts/google | |
| rm -f /tmp/google-fonts.zip | |
| fc-cache -fv | |
| color_echo "green" "Google Fonts installed successfully." | |
| # Install Adobe fonts collection | |
| color_echo "yellow" "Installing Adobe Fonts..." | |
| mkdir -p $ACTUAL_HOME/.local/share/fonts/adobe-fonts | |
| git clone --depth 1 https://github.com/adobe-fonts/source-sans.git $ACTUAL_HOME/.local/share/fonts/adobe-fonts/source-sans | |
| git clone --depth 1 https://github.com/adobe-fonts/source-serif.git $ACTUAL_HOME/.local/share/fonts/adobe-fonts/source-serif | |
| git clone --depth 1 https://github.com/adobe-fonts/source-code-pro.git $ACTUAL_HOME/.local/share/fonts/adobe-fonts/source-code-pro | |
| fc-cache -f | |
| color_echo "green" "Adobe Fonts installed successfully." | |
| # Custom user-defined commands | |
| # Custom user-defined commands | |
| echo "Created with ❤️ for Open Source" | |
| # Before finishing, ensure we're in a safe directory | |
| cd /tmp || cd $ACTUAL_HOME || cd / | |
| # Finish | |
| echo ""; | |
| echo "╔═════════════════════════════════════════════════════════════════════════╗"; | |
| echo "║ ║"; | |
| echo "║ ░█░█░█▀▀░█░░░█▀▀░█▀█░█▄█░█▀▀░░░▀█▀░█▀█░░░█▀▀░█▀▀░█▀▄░█▀█░█▀▄░█▀█░█░ ║"; | |
| echo "║ ░█▄█░█▀▀░█░░░█░░░█░█░█░█░█▀▀░░░░█░░█░█░░░█▀▀░█▀▀░█░█░█░█░█▀▄░█▀█░▀░ ║"; | |
| echo "║ ░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░░░░▀░░▀▀▀░░░▀░░░▀▀▀░▀▀░░▀▀▀░▀░▀░▀░▀░▀░ ║"; | |
| echo "║ ║"; | |
| echo "╚═════════════════════════════════════════════════════════════════════════╝"; | |
| echo ""; | |
| color_echo "green" "All steps completed. Enjoy!" | |
| # Prompt for reboot | |
| prompt_reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment