This is a collection of linux tips/commands I found useful during my linux journey. I try out different linux distro every now and then so this post contains a mix of different distro as well. Currently I am running KDE Neon.
Mounting NTFS file system after a fresh installation.
yum --enablerepo=extras install epel-release yum install ntfs-3g fuse
Setup multimedia on CentOS 7
When a repository is causing problem, head to
And open up the repos that’s causing problem and set
Find dependencies for a particular package
yum deplist <package name>
yum deplist vlc
Find out where a package comes from
yum provides <packgage name>
Dependencies for Handbrake
Easiest way I found to install nvidia driver on Cent OS 7
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm yum install nvidia-detect yum install $(nvidia-detect)
Install Skype on Cent OS 7
get https://repo.skype.com/latest/skypeforlinux-64.rpm sudo yum localinstall skypeforlinux-64.rpm
Wacom multiple monitor mapping with xsetwacom (Wacom settings not found in KDE Plasma)
When device doesn’t shows up on KDE Connect (You can run the following commands each time, or use the append argument to add it to it permanently)
iptables -I INPUT -p tcp --dport 1714:1764 -j ACCEPT iptables -I INPUT -p udp --dport 1714:1764 -j ACCEPT
Maya fonts error
sudo yum install xorg-x11-fonts*
Combine pdf file with command line, details here
sudo yum install pdftk pdftk file1.pdf file2.pdf file3.pdf output outputName.pdf
Open a .jar file with java.
java -jar file.jar
Find and delete duplicate files
Tell yum to treat a manually installed package as installed, solution found hereTwo possible solutions.
# Download the package yumdownloader something-xyz # Test whether emacs is the only dependency. rpm -Uvh --test something-xyz.rpm # If emacs is the only dependency, then install the package rpm -Uvh --nodeps something-xyz.rpm
If there are other dependencies, than you can try to install via yum if they are not dependent on emacs. Otherwise, you will need to do the same process as above to install them.
2) If all of this does not work with your hand installation of emacs, then the last resort would be to install the emacs version that yum by default wants to install, but invoke your own version of emacs instead of the one yum installs.
Formatting a USB drive with FAT32 file system
First find out its mount point
mkfs –t vfat
According to this post here, changing/adding environment paths in CentOS 7 by adding .sh file in /etc/profile.d, below is sample of adding pycharm/bin
# echo 'pathmunge /opt/pycharm-edu-2018.2/bin/' > /etc/profile.d/pycharm.sh
# echo 'PATH="/opt/pycharm-edu-2018.2/bin/:$PATH"' > /etc/profile.d/pycharm.sh
# chmod +x /etc/profile.d/pycharm.sh
# . /etc/profile
Customizing extra buttons on my mouse, reference askubuntu, stackexchange and ArchWiki
- Install the required packages
sudo yum install xev xbindkeys xdotool
In my case xev was already installed
- Create a default xbindkeys configuration file
xbindkeys -d > ~/.xbindkeysrc
- To find out mouse button name, run xev in terminal, it’ll open a blank window for you to move or click your mouse in. But note that it will also print mouse movement, so to isolate mouse clicks only run this instead
xev -event mouse | grep Button --before-context=1 --after-context=2
- Open ~/.xbindkeysrc with your preferred text editor, and this is where you map specific functions to your mouse button with the button names you gathered from previous step. For my purpose I was mapping button 8 and 9 to volume control, which resulted in the code below in my ~/.xbindkeysrc
"xdotool key XF86AudioLowerVolume"
"xdotool key XF86AudioRaiseVolume"
You can either search or use my reference above to find other configuration methods.
Command to open default terminal program
works for most Debian distros…While trying to find something that works across distros I found this amazing yet ridiculous solution
This plugin adds an option in dolphin right click menu to Copy Path