Skip to content

Instantly share code, notes, and snippets.

@zobayer1
Last active March 22, 2024 17:18
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save zobayer1/c60c0c6ab28d4b258818c3a4a2b65e65 to your computer and use it in GitHub Desktop.
Save zobayer1/c60c0c6ab28d4b258818c3a4a2b65e65 to your computer and use it in GitHub Desktop.
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname

  • Method (a): from Settings -> About, change Device Name.
  • Method (b): from terminal, run (change <newhostname> to your liking):
    sudo hostnamectl set-hostname <newhostname>

Mouse, Touchpad and Keyboard

  • Go to Settings -> Devices -> Mouse & Touchpad to enable touchpad scrolling and taps.
  • Go to Settings -> Devices -> Keyboard Shortcuts to add shortcut for Terminal (Command: gnome-terminal), Switch windows, Switch applications, Hide all normal windows, etc.

Desktop and Display

  • Go to Settings -> Displays to adjust your monitors and resolution settings.

Editors

  • Fedora 36 comes with Text-Editor as the default editor.
  • If you are a vim user, install vim: sudo dnf install vim
  • Create file ~/.vimrc and add following content
    syntax on
    set shiftwidth=4 softtabstop=4 expandtab
    set autoindent
  • You can customize vim to suit your taste. Examples.

DNF Plugins

Enable DNF Fastest Mirror

  • Edit /etc/dnf/dnf.conf and add the following lines at the end
    fastestmirror=true
    deltarpm=true
  • Install DNF plugins core (should be installed already):
    sudo dnf install -y dnf-plugins-core
  • Run
    sudo dnf -y update
    sudo dnf -y upgrade

Software Sources

Enable Third-party Repositories

  • Software -> Software Repositories -> Third Party Repositories -> Enable All
  • From the list below, enable required repositories such as google-chrome, nvidia-drivers, steam, etc.

Enable RPM-Fusion

  • Free
    sudo rpm -Uvh https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
  • Non-free
    sudo rpm -Uvh https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Source

Microsoft Core Fonts

  • Install Additional Fonts
    sudo dnf install curl cabextract xorg-x11-font-utils fontconfig
    sudo rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

Source

Software Updates

  • Open Software, Go to Updates tab and hit the refresh button.
  • Install all updates (if any). This may take a few minutes to several hours.
  • Alternatively, run sudo dnf -y update.
  • Reboot your system once the process is finished.

Drivers

GPU Drivers

  • Note: Driver installation is a tricky process and many things can go wrong, proceed with caution.
  • Nvidia driver installation guide.
  • For AMD GPUs: Open source amdgpu driver is already included.
  • Reboot your system after you have made changes to driver softwares.

Multimedia

Install Google Chrome

  • After enabling google-chrome package from Third Party Repositories, search and install from Software
  • Start Chrome from Application Dashboard to update settings, connect google account, enable syncing etc.

Install VLC and Codecs

  • Install VLC Player: sudo dnf install vlc
  • VLC comes in with most common codecs you will need. For additional codecs, open Software and search codecs. Install various GStreamer codecs from search results.

Install Spotify

  • Spotify for Linux is still experimental. Visit official linux distribution page.
  • Install using snap:
sudo snap install spotify
  • Hide the annoying snap directory from your ~ home:
echo "snap" >> .hidden

Version Control - Git

Comes with Git 2.31+

Git Plugins for Bash

  • Download git-prompts script for command prompt information
    wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -O .gitprompt
    chmod 755 .gitprompt
  • Download git-completion to autocomplete git commands
    wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -O .gitcompletion
    chmod 755 .gitcompletion
  • Add the following to your ~/.bashrc file:
    # git plugins
    . ~/.gitcompletion
    . ~/.gitprompt
    export GIT_PS1_SHOWDIRTYSTATE=1
    export PS1='[\u@\h \W]$(__git_ps1 " (%s)")\$ '
  • Source your ~/.bashrcfile:
    source ~/.bashrc

Source

Git Global Config

  • Update your global config
    git config --global user.name "your name"
    git config --global user.email youremail@example.com
    git config --global core.editor vim

GUI Tools


SSH Keys and VPN

Enable SSH

  • Install: sudo dnf install -y openssh-server
  • Start service at boot: sudo systemctl enable sshd.service
  • Start service: sudo systemctl start sshd.service
  • To test, run: ssh localhost -l <username>
  • (Optional) Change default port:
    • Open sshd_config: sudo vi /etc/ssh/sshd_config
    • Find a line: Port 22 (or #Port 22)
    • Change it to some other port number (choose port number between 1024 and 65535): Port 2222 (make sure to remove commenting #).
    • Save the file.
    • Update iptables and firewall to allow traffic:
      sudo /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT
      sudo firewall-cmd --permanent --zone=public --add-port=2222/tcp
      sudo firewall-cmd --reload
    • Restart sshd service: sudo systemctl restart sshd.service
    • Verify that your new port is open: netstat -tulpn | grep 2222

Generate SSH Public Private Key Pairs

  • Run ssh-keygen and answer the prompts.
  • Verify you have the files: ls ~/.ssh
  • Start ssh-agent: eval `ssh-agent`
  • Add private key to ssh-agent: ssh-add ~/.ssh/id_rsa
  • You can now use the content of ~/.ssh/id_rsa.pub as your public key.
  • For example, add the content of ~/.ssh/id_rsa.pub as your bitbucket.org or github.com ssh key.
  • Note: Fedora33+ drropped SHA1 support. You have to update configurations for legacy hosts such as bitbucket.
    • Create a file ~/.ssh/config with following content:
      Host bitbucket.org
          PubkeyAcceptedKeyTypes +ssh-rsa
    • Change permission: chmod 600 ~/.ssh/config
  • To verify: ssh -T git@bitbucket.org or, ssh -T git@github.com

Source

Setup GPG Keys


Development Tools

Visual Studio Code

  • Run following commands
    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
    sudo dnf check-update
    sudo dnf install code

Source

JetBrains Toolbox

  • Download tar.gz archive from Toolbox App page.
  • Extract and run JetBrains Toolbox binary executable file by double clicking.
  • This should install and run the toolbox. You can install your favorite JetBrains IDEs (PyCharm Community, IntelliJ IDEA Community, Android Studio, etc) from the toolbox, it will keep them updated too.
  • You can remove downloaded and extracted files after installation.

Postman

You can install Postman via snap. Visit https://snapcraft.io/postman. If you do not like snap, you can manually install Postman using the following steps:

  • Download the .tar.gz file from https://www.postman.com/downloads/.
  • Extract the archive file: sudo tar xvzf Postman-linux-x64-8.10.0.tar.gz -C /opt
  • Create symlink: sudo ln -s /opt/Postman/app/Postman /usr/local/bin/postman
  • Open a file ~/.local/share/applications/postman.desktop and add the following content
    [Desktop Entry]
    Name=Postman
    GenericName=API Client
    X-GNOME-FullName=Postman API Client
    Comment=Make and view REST API calls and responses
    Keywords=api;
    Exec=/opt/Postman/app/Postman
    Terminal=false
    Type=Application
    Icon=/opt/Postman/app/resources/app/assets/icon.png
    Categories=Development;Utilities;
  • Hide postman directory from your home:
    echo "Postman" >> .hidden

Languages

C/C++

  • Comes with gcc 11.
  • If you use g++ command, you can install sudo dnf install gcc-g++

Python

  • Fedora 36 comes with Python 3.10, follow this for older versions of Python 3.
  • Install python headers and static libraries: sudo dnf install python3-devel
  • Update pip: python -m pip install --user --upgrade pip
  • Install python libraries like cookiecutter, tox, pytest, etc using pip.

Java

  • Visit Oracle's site to download and install Oracle's Java SDKs. Be careful about licensing if you are using a later version than Java 8. It is recommanded to use JDK libraries locally to avoid system-wide mess with update-alternatives command.

Go

  • Download linux archive and run tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
  • Upate $PATH variable at the end of your ~/.bashrc file:
    export PATH=$PATH:/usr/local/go/bin
  • Source bashrc file: source ~/.bashrc

NVM and NodeJS

  • Use NVM (Node Version Manager) to install and manage multiple version of NodeJS and npm following this guide
  • Installation:
    • curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
    • source ~/.bashrc or exec bash
  • Run nvm ls-remote to list down all available node versions
  • Install your required version using nvm. Example: nvm install 16.17.1
  • Actiate a specific version using nvm. Example: nvm use 16.17.1

Apache Server (Apache httpd)

  • Install Apache HTTP server following this guide
  • Test if the HTTP server is running: sudo systemctl status httpd

Docker

Podman comes with Fedora/CentOS/RHEL systems. Podman should be able to work with your dockerfiles, and in many cases, a more flexible option. Anyway, you can install docker in Fedora 34/35/36. Note: For older versions of Fedora, Docker can only be installed after downgrading to cgroup v1.

  • Install the dnf-plugins-core package (which provides the commands to manage your DNF repositories) and set up the repository.
    sudo dnf -y install dnf-plugins-core
    sudo dnf config-manager \
       --add-repo \
       https://download.docker.com/linux/fedora/docker-ce.repo
  • Install the latest version of Docker Engine, containerd, and Docker Compose or go to the next step to install a specific version:
    sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  • Start docker service and check status
    sudo systemctl start docker
    sudo systemctl status docker
  • Add yourself to docker usergroup to access without sudo
    sudo usermod -aG docker $(whoami) && newgrp docker
  • Update firewall
    sudo firewall-cmd --permanent --zone=trusted --add-interface=docker0 && sudo firewall-cmd --reload
    sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-masquerade
  • Verify that Docker Engine is installed correctly by running the hello-world image.
    sudo docker run hello-world

Source

Docker and Sudoer (a.k.a Why Podman is better?)

Install Docker Desktop

Docker Desktop is an easy to use app to track your docker images and maintain image lifecycle.

  • Set up repository
    sudo dnf -y install dnf-plugins-core
    sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
    
  • Download rpm package using wget or from here
    wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.13.0-x86_64.rpm
    
  • Install RPM Package
    sudo dnf install -y docker-desktop-4.13.0-x86_64.rpm
    
  • Search Docker Desktop on the Applications menu and open it. This launches the whale menu icon and opens the Docker Dashboard, reporting the status of Docker Desktop. Alternatively, open a terminal and run:
    systemctl --user start docker-desktop
    

Source


Any suggestions? Please feel free to add suggestions in the comments below. Happy software engineering.

@rad8329
Copy link

rad8329 commented Jan 27, 2021

Nice!

@Anvith00
Copy link

I like this, thanks a lot mate ❤️..

@zobayer1
Copy link
Author

I like this, thanks a lot mate ..

Thanks. I'm glad that you've liked it. I update these time to time, please keep an eye out.

@NtapeKnoxSiwale
Copy link

Just shifted from ubuntu to fedora and I have to say I needed this, Thank you.

@mikeslattery
Copy link

Docker now works well with Fedora. Docker now uses cgroups v2.

I have both podman and docker installed. I still prefer podman for personal stuff, but I use docker for running my work containers on my desktop, as it's closer to how they run in production.

@zobayer1
Copy link
Author

Docker now works well with Fedora. Docker now uses cgroups v2.

I have both podman and docker installed. I still prefer podman for personal stuff, but I use docker for running my work containers on my desktop, as it's closer to how they run in production.

Updated. Thanks :) I only use Podman as well, as that is what we use in production.

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