Show Menu

Terminal tips Cheat Sheet by

Linux Drivers

sudo fdisk -l
sudo mount /dev/sdb1 /media­/usb
sudo umount /media­/usb
sudo mkfs.vfat /dev/sdb1
Burn ISO
sudo dd if=/pa­th/­to/­ubu­ntu.iso of=/de­v/sdb bs=1M
sudo eject /dev/sdb1

Multiples git user same computer

* Generate new ssh: ssh-k­eygen -t rsa -C "­you­r-e­mai­l-a­ddr­ess­"
> Use a new file name like: id_rs­a_O­THE­RUSER
* Add new ssh: ssh-add ~/.ssh­/id­_rs­a_O­THE­RUSER
* Open/c­reate a config file vim ~/.ssh­/co­nfig
* Add a new Host config­uration like:
Host github­-OT­HERUSER
User git
Identi­tyFile ~/.ssh­/id­_rs­a_O­THE­RUSER

* Update­/clone your repository with this format:
* git remote [add or set-url] origin git@gi­thu­b-O­THE­RUS­ER:­Com­pan­y/t­est­ing.git
* git clone git@gi­thu­b-O­THE­RUS­ER:­Com­pan­y/t­est­ing.git

> The githu­b-O­THE­RUSER will is reference to config file thats point to otheruser ssh file.

git config "­OTH­ER_­USE­RNA­ME"
git config "­OTH­ER@­EMA­IL"


* Copy directory: cp -Rp source source­_copy
* Check wifi signal: watch -n1 iwconfig
* Copy to clipbo­ard­{C­ommand} | xclip -selection clipboard


* Listing all AVDs: ls ~/.and­roi­d/avd/
* Run emulator: emulator -avd {avd_name} -qemu -m 512 -enabl­e-kvm
* Deleting an AVD: android delete avd -n {avd_n­ame}
* Install APK: adb -s emulat­or-5554 install jsHybu­gge­r.apk

Sync git fork repo

* Add the remote "­ups­tre­am": git remote add upstream https://{{url}}
* Fetch all the branches: git fetch upstream
* Go to master branch: git checkout master
* Rewrite your master branch: git rebase upstre­am/­master
* Update: git push -f origin master

From stackoverflow


* Speedup video: ffmpeg -i input.mkv -r 16 -filter:v "­set­pts­=0.5­*­PTS­" output.mkv from docs

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          tmux the terminal multiplexer Cheat Sheet
          Terminal Unix et Ligne de Commande Cheat Sheet
          Top 30 linux shell tricks Cheat Sheet

          More Cheat Sheets by ridermansb

          CMD Utils Cheat Sheet