Linux ifconfig cheat sheet
Display link status & IP Addresses ifconfig Bring interface up ifconfig eth0 up Bring interface down ifconfig eth0 down Assign IP to device eth0 ifconfig eth0 Assign IP to device…
Linux ip cheat sheet
Display link status ip link show Display ip addresses ip addr show Bring interface up ip link set eth0 up Bring interface down ip link set eth0 down Assign IP…
How to undo git local commit(s)
Before pushing changes if you want to change last commit(s) Soft reset git reset HEAD~ Your files are left as is, you can now modify, commit and push. Hard reset…
GIT workflow
1. Fork at 2. Clone it locally git clone name>/<repo name>.git 3. Configure username and email address git config 'Yogesh Sharma' git config 4. Add upstream git remote add upstream…
Backup freeotp
Setup android-tools on Fedora 25 Install Android tools sudo dnf install android-tools Setup udev rules sudo cp /usr/share/doc/android- /etc/ Enable and Start adb sudo systemctl enable adb sudo systemctl start…
Setup RPM Build ENV
Install required packages sudo yum install rpm-build redhat-rpm-config yum-utils Setup build environment mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros Download src rpm and save it to ~/rpmbuild/SRPMS/ Install build…
Install ARES Wizard on Kodi
To Install Ares Wizard: Start Kodi Goto SYSTEM > File Manager Select Add Source Select None Type the following select Done Highlight the box underneath Enter a name for this media Source,…
Find KVM VM’s IP from Host
Create following function in your .bash_profile FIND_VMIP() { VM=$1 IP=$(arp -e | grep $(sudo virsh domiflist ${VM} |grep vnet| awk '{print $5}') | awk '{print $1}') echo "VM ${VM} has…
Bash Shortcuts
Command Control Shortcuts Ctrl + l – clear the screen Ctrl + s – stops the output to the screen (for long running verbose command) Ctrl + q – allow…
Extending PV/VG/LV on iSCSI
Extend iSCSI storage Stop LV on all nodes except one Rescan iSCSI node on one host # iscsiadm -m node -R Resize PV # pvresize /dev/<disk/part> Execute vgs and verify…