Technical notes‎ > ‎

Using Fedora Linux

posted May 27, 2014, 2:08 AM by Le Tuan Anh   [ updated Sep 21, 2019, 1:14 AM ]
Note: This guide is meant for Fedora Linux, if you use Ubuntu, click here.


  • GNU Screen for multiple screens in text-based terminals
  • Emacs - A great editor (and the best for many)

Using Bash

Compress & uncompress files

zip file1.txt file2.txt file3.txt
unzip -d new_output_folder/

tar -zcvf mypackage.tar.gz myfolder
tar -xvf mypackage.tar.gz

Generate a time stamp

echo `date +%Y-%m-%d_%H%M%S`

List installed packages by size (Credit:

rpm -qa --queryformat '%10{size} - %-25{name} \t %{version}\n' | sort -n

Run applications as another user

xhost +local:[username]

Verifying downloaded packages

Create a hash file like this, name it SHA256INFO.txt (or any meaningful name you come up with), save it under the same folder with the two exe files

07837a9d0135d26706ef31c47e1932aa00dc18e996e5b35eac437cbfa4959ccf *basic-miktex-2.9.6753-x64.exe
c8b85fc4694d748e8e481ea8e9a31057688c9e16dda8ea7686c00b29b9d6f6e2 *miktex-portable-2.9.6753.exe

From the terminal, go to the folder and type

sha256sum -c SHA256INFO.txt


Useful packages

Version control package

yum install svn git

Enable ssh
sudo dnf install -y openssh-server
systemctl enable sshd
# to start sshd service
systemctl start sshd
# To check service status
systemctl status sshd

Change hostname

hostnamectl set-hostname mynewhostname

Upgrading Fedora (18 to 20)

Using fedup (

yum install fedup
# To update to Fedora version 20 using network
fedup --network 20

If you encounter this error message: Downloading failed: could not verify GPG signature: No public key, run:

yum update fedora-release

Upgrading Fedora (20-24)

dnf install fedora-upgrade

Clean up after upgraded to new Fedora
package-cleanup --oldkernels

[Gnome 3] - Creating application icon

Try to create a eclipse.desktop file under /usr/share/applications (or ~/.local/share/applications or directly in ~/Desktop) with the following content:

[Desktop Entry] Encoding=UTF-8 Name=Eclipse IDE Exec=/path/to/eclipse/executable Icon=/path/to/eclipse/icon Type=Application Categories=Development;

You can choose another category, too. For additional information:

Adopted from:

Using PowerTop

yum install tuned-utils powertop

Run powertop under su to tune. To generated a profile, use powertop2tuned tool. E.g.

powertop2tuned bestbattery

This command will create a profile at /etc/tuned/bestbattery. To edit the profile manually check the tuned.conf inside that folder. If you want a specific USB device to be always on, set it to "on".

# Autosuspend for USB device G3 [A.....]

tuned-adm profile my_profile_name
systemctl enable tuned

Installing drivers

Installing Wifi driver

  1. Find out your wifi driver
    lspci | grep Network
  2. Enable non-free repository
    wget$(rpm -E %fedora).noarch.rpm
    rpm -ivh rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
    dnf clean all
  3. Install wifi driver
    dnf install akmod-wl
    dnf install kernel-devel
    1. Note: If it's intel driver, iwlXXXX can be used. E.g.:
  4. Enable wifi driver
    akmods --force
    modprobe wl
    systemctl restart NetworkManager
This installation guide was adopted from this post by Antoine Hordez, it works for Fedora 23 and 24 too:

Fixing Wireless Connection randomly disconnects

su - modprobe iwlwifi 11n_disable=1
# to run on boot
su - echo "options iwlwifi 11n_disable=1" > /etc/modprobe.d/iwlwifi.conf

Installing NVidia driver

  1. Download the driver from Nvidia homepage
  2. Update kernel, kernel-devel, etc.
    dnf install kernel-devel kernel-headers gcc dkms acpid
  3. Disable default driver
    echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
  4. Check which graphic driver is being used
    lshw -c video
  5. We should see something like this
           description: VGA compatible controller
           product: GM204M [GeForce GTX 970M]
           vendor: NVIDIA Corporation
           physical id: 0
           bus info: pci@0000:01:00.0
           version: a1
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
           configuration: driver=nvidia latency=0
  6. We also can use modinfo nvidia to get more information.