Technical notes‎ > ‎

Using Fedora Linux

posted May 27, 2014, 2:08 AM by Le Tuan Anh   [ updated Sep 25, 2017, 2:38 AM ]

Applications:

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

Using Bash

Compress & uncompress files

zip myfile.zip file1.txt file2.txt file3.txt
unzip myfile.zip -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: https://blog.tinned-software.net/show-installed-yum-packages-by-size/)

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

--

Useful packages

Version control package

yum install svn git

Enable ssh
sudo dnf install -y openssh-server
systemctl enable sshd

Change hostname

hostnamectl set-hostname mynewhostname

Upgrading Fedora (18 to 20)

Using fedup (https://fedoraproject.org/wiki/Upgrading)

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
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: http://askubuntu.com/questions/112186/how-do-you-create-a-custom-application-launcher-in-gnome-shell

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.....]
/sys/bus/usb/devices/3-2/power/control=on


tuned-adm profile my_profile_name
systemctl enable tuned

Installing Wifi driver

  1. Find out your wifi driver
    lspci | grep Network
  2. Enable non-free repository
    wget http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(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.: https://apps.fedoraproject.org/packages/iwl7260-firmware
  4. Enable wifi driver
    akmods --force
    modprobe wl
    iwconfig
    systemctl restart NetworkManager
This installation guide was adopted from this post by Antoine Hordez, it works for Fedora 23 and 24 too: http://antoine.hordez.fr/2015/07/28/howto-bcm43228-802-11abgn-on-fedora-2122/

Installing NVidia driver
  1. Download the driver from Nvidia homepage http://www.geforce.com/drivers
  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
      *-display                
           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.


[TO BE UPDATED]

Comments