Show Menu

Terminal tips Cheat Sheet by

terminal     cli

Linux Drivers

List
sudo fdisk -l
Mount
sudo mount /dev/sdb1 /media­/usb
Umount
sudo umount /media­/usb
Format
sudo mkfs.vfat /dev/sdb1
Burn ISO
sudo dd if=/pa­th/­to/­ubu­ntu.iso of=/de­v/sdb bs=1M
Eject
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
HostName github.com
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 user.name "­OTH­ER_­USE­RNA­ME"
git config user.email "­OTH­ER@­EMA­IL"
 

OS

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

Android

* 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

ffmpeg

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

Download the Terminal tips Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/ridermansb_terminal-tips.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

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
          Top 30 linux shell tricks Cheat Sheet
          Terminal Unix et Ligne de Commande Cheat Sheet

          More Cheat Sheets by ridermansb

          CMD Utils Cheat Sheet
          IntelliJ IDE Shortcuts Cheat Sheet