Install NVIDIA Driver and sign the Kernel module on Fedora 39

sudo dnf install kmodtool akmods mokutil openssl

sudo kmodgenca -a
sudo mokutil --import /etc/pki/akmods/certs/public_key.der

You will be asked to enter a password, it doesn’t have to be very strong, just make sure to remember it. You’ll only need it once during  these steps.

sudo reboot

After reboot you will see MOK Manager interface and will be asked to enroll the key.
First select “Enroll MOK“.
Then “Continue“.
Hit “Yes” and enter the password.
Then select “OK” and your device will reboot again.

sudo dnf install gcc kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686
sudo akmods --force
sudo dracut --force
sudo reboot
lsmod | grep -i nvidia

References
https://blog.monosoul.dev/2022/05/17/automatically-sign-nvidia-kernel-module-in-fedora-36/
https://rpmfusion.org/Howto/NVIDIA#Current_GeForce.2FQuadro.2FTesla

Install the .NET SDK on Fedora

In the ever-evolving world of web development, security is paramount. Here we provide a step-by-step guide to not only installing the .NET Software Development Kit (SDK) on Fedora, but also generating an SSL Certificate for your .NET apps, thus ensuring secure connections between client and server.

Part 1: Installing the .NET SDK on Fedora

Our first step is to install the .NET SDK. The .NET SDK is a set of libraries and tools that allow developers to create .NET apps and libraries. It is the foundation for building applications and libraries with .NET Core.

Here’s how you can install the .NET SDK on your Fedora system:

  1. Open a terminal window.
  2. Input the following command:
    sudo dnf install dotnet-sdk-7.0
  3. Press Enter. You might be asked for your password; if so, provide it and press Enter again.
  4. Let the installation process finish.

After the completion of the above steps, the .NET SDK should be installed successfully on your Fedora system.

Part 2: Creating an SSL Certificate for Your .NET Apps

Creating an SSL certificate for your .NET applications can enhance the security of your applications. Here’s how you can generate an SSL certificate:

  1. First, we need to install Easy-RSA, a CLI utility to build and manage a PKI CA. Run this command:
    sudo dnf install easy-rsa
  2. Now, navigate to the home directory and create a new directory .easyrsa with permissions set to 700:
    cd ~
    mkdir .easyrsa
    chmod 700 .easyrsa
  3. Copy the Easy-RSA scripts to our newly created directory:
    cd .easyrsa
    cp -r /usr/share/easy-rsa/3/* ./
  4. Initialize the Public Key Infrastructure:
    ./easyrsa init-pki
  5. We need to set some variables for our certificate. Create a new file called vars and add the following details in it (You can modify these details according to your requirement):
    cat << EOF > vars
    set_var EASYRSA_REQ_COUNTRY "US"
    set_var EASYRSA_REQ_PROVINCE "Texas"
    set_var EASYRSA_REQ_CITY "Houston"
    set_var EASYRSA_REQ_ORG "Development"
    set_var EASYRSA_REQ_EMAIL "[email protected]"
    set_var EASYRSA_REQ_OU "LocalDevelopment"
    set_var EASYRSA_ALGO "ec"
    set_var EASYRSA_DIGEST "sha512"
    EOF
  6. Now build the CA with nopass option to not secure the CA key with a passphrase:
    ./easyrsa build-ca nopass
    
  7. Copy the generated certificate to the trusted CA directory and update the CA trust on your system:
    sudo cp ./pki/ca.crt /etc/pki/ca-trust/source/anchors/easyrsaca.crt
    sudo update-ca-trust
  8. Generate a new key and a certificate signing request for localhost:
    mkdir req
    cd req
    openssl genrsa -out localhost.key
    openssl req -new -key localhost.key -out localhost.req -subj /C=US/ST=Texas/L=Houston/O=Development/OU=LocalDevelopment/CN=localhost
    cd ..
  9. Import the certificate signing request and sign it:
    ./easyrsa import-req ./req/localhost.req localhost
    ./easyrsa sign-req server localhost
  10. Now, move the server certificate and key to a new directory .certs and convert the certificate to PKCS#12 format:
    cd ~
    mkdir .certs
    cp .easyrsa/pki/issued/localhost.crt .certs/localhost.crt
    cp .easyrsa/req/localhost.key .certs/localhost.key
    cd .certs
    openssl pkcs12 -export -out localhost.pfx -inkey localhost.key -in localhost.crt
  11. Lastly, add the path and the password for the certificate in the .bashrc file so the .NET Core Kestrel server can find it (replace YOUR_USERNAME with your actual username and PASSWORD with the password you want to use for your certificate):
    cat << EOF >> ~/.bashrc
    # .NET
    export ASPNETCORE_Kestrel__Certificates__Default__Password="PASSWORD"
    export ASPNETCORE_Kestrel__Certificates__Default__Path="/home/YOUR_USERNAME/.certs/localhost.pfx"
    EOF

And that’s it! You’ve now installed the .NET SDK and generated an SSL certificate for your .NET apps. Your applications are not only more secure but also more professional, creating trust with users who value their data privacy and security.

Install Fedora Linux on Asus ROG Strix

Hello Linux enthusiasts! Today, we are going to guide you through the process of installing Fedora Linux on the Asus ROG Strix, a gaming beast that’s known for its performance, style, and power. Let’s dig into the steps to get this done!

Preparing the System

Before starting with the installation process, make sure that your system is prepared for it. If you are currently using another operating system, back up any necessary files and ensure that you have the required permissions to install a new operating system.

Installation Process

  1. Start with downloading the Fedora ISO image file. Make sure you download the right version for your system’s architecture, which is usually 64-bit for modern computers.
  2. Create a bootable USB stick using this ISO file.
  3. Boot your Asus ROG Strix from this USB stick. This usually involves pressing a specific key during the system start-up.
  4. Follow the installation prompts provided by the Fedora installer. Make sure you select the right options for your system, such as language, time, keyboard layout, and installation type.

After the installation is complete, restart your computer.

Disabling WiFi Power Saving Mode

Once the system is ready and you are logged into Fedora, it’s time to disable the WiFi power saving mode. This mode can sometimes interfere with your WiFi connection, especially during heavy network usage.

Open the terminal and enter the following command to create a new configuration file:

sudo vi /etc/NetworkManager/conf.d/wifi-powersave-off.conf

Inside the file, write:

[connection]
wifi.powersave = 2

Save and close the file.

Next, restart the NetworkManager service with:

sudo systemctl restart NetworkManager

Setting Up Asus Utilities

In order to make the most out of your Asus ROG Strix hardware, we will install some additional utilities. The first step is to add the Asus-linux repository:

sudo dnf copr enable lukenukem/asus-linux

Now, install the Asus-linux utility and make sure your system is up to date:

sudo dnf install asusctl supergfxctl sudo dnf update --refresh

After the installation, enable the supergfx service:

sudo systemctl enable supergfxd.service

Then, start the service:

sudo systemctl start supergfxd

Install the ROG Control Center (GUI) to have a graphical interface for the Asus ROG utilities:

sudo dnf install asusctl-rog-gui

Install GNOME Extensions

To further enhance your user experience, install some GNOME extensions. One particular extension we recommend is ‘supergfxctl-gex’. You can install it from this link.

That’s it! You have now installed Fedora Linux on your Asus ROG Strix and configured it for optimal use. The system is now ready for you to explore and conquer. Enjoy the power of Linux!

Create a Samba share on Fedora

sudo dnf install samba
sudo systemctl enable smb --now
firewall-cmd --get-active-zones
sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-service=samba
sudo firewall-cmd --reload

Samba does not use the operating system users for authentication, so your user account must be duplicated in Samba. So if your account is jane on the host, the user jane must also be added to Samba. While the usernames must match, the passwords can be different.

sudo smbpasswd -a jane
mkdir /home/jane/share
sudo semanage fcontext --add --type "samba_share_t" ~/share
sudo restorecon -R ~/share
sudo nano /etc/samba/smb.conf
[share]
        comment = My Share
        path = /home/jane/share
        writeable = yes
        browseable = yes
        public = yes
        create mask = 0644
        directory mask = 0755
        write list = user
sudo systemctl restart smb

Disable SELinux if required

sudo nano /etc/selinux/config
SELINUX=disabled
sudo reboot

References
https://docs.fedoraproject.org/en-US/quick-docs/samba/
https://www.cyberciti.biz/faq/disable-selinux-on-centos-7-rhel-7-fedora-linux/