[Sprint HTC One (M7)] HTC_M7:
To start I will be adding a lot to this over time so dont be upset if I dont have everything.

To open a terminal without finding it in your programs all you need to do is ctrl+alt+t

Heavily used Commands

cd: this command is used to navigate through your directory's. For example if you have a folder named apps on desktop you would type... cd Desktop...then cd apps.

mkdir: this means make directory or folder. For example cd to your directory then do mkdir whatever. Then you can cd right into that directory ever.

pwd: print working directory. This shows you where you are on the filesystem. This helps if your deep in a directory or folders.

ls: this means list. This tells you all the files in your present working directory.

man: this means manual. This prints like a help page in the terminal to guide you on whatever you need. This can be used for many things.

cp: means copy a file or directory

rm and rmdir: remove a file or like rmdir remove a directory.

mv: move a file or directory

The next command is to issue a command. There are a couple of popular ways of doing so.

First

"./": this is to issue or run a command or file that is in your current directory.

Second

"../": this runs the file that is directly above your current directory.

cat: prints a list of provided text files to the screen.

grep or global regular expression print: searches for patterns or a pattern in a list of files. This is great for small editing if thats what your into and so is.....

diff: compares two text files and displays the differences found between the files on the screen.

history: this is very useful. This shows you a list of your recent commands if you forgot the exact command. To select a command on the list use "!". For example if the label for the command is 00 then type "!00". However most linus OS's allow you to use the up arrow and enter key instead.

Also if you guys dont want a full help list using the "man" command you can use this command: --help

Popular Terminal Commands for Android:

adb: also called android debug bridge is used to issue commands to your phone and debug.

Most people use the following:

adb devices: shows what devices are connected to the computer

adb push and pull: can transfer file from computer to phone and vice versa.

if you want to push an apk to your system make sure that apk is in your adb folder and type: "adb push target.apk system/apps"

adb reboot

adb reboot bootloader

adb logcat: if you are either porting, making roms, or just debugging for a dev you need to know how to logcat. Also if you want to just take the log and make it into a txt file to share just issue the following; "adb logcat -d> logcat.txt"

The logcat will go to your adb folder and save as logcat.txt.

fastboot: is a tool used to update the flash filesystem

I use fastboot for a few things including flashing splashes and flashing recoveries. For example:

Take twrp. To flash to htc one you do...

"fastboot flash recovery twrp.img" presuming you are in your fastboot directory in terminal and the recovery.img is in that folder.

Now as you may know htc uses fastboot to unlock and lock the bootloader using the following commands:

"fastboot oem unlock"

"fastboot oem lock"

Of course you should know this by now you need to be in bootloader under fastboot usb mode.

Now to be able to use fastboot and adb u need sdk and java. Lets start.

"sudo apt-get install openjdk-6-jre openjdk-6-jdk icedtea6-plugin"

This will get u java jdk. Sudo means root and apt-get install means terminal is pulling the file from servers and then installing it.

Next you want sdk. So instead of going all around and downloading it just do this.

" wget http://dl.google.com/android/android-sdk_r20-linux.tgz"

Wget means you are "getting the package".And then you want to extract the file.

"tar -xvzf android-sdk_r20-linux.tgz"

Seeing how the file is a tar "tar -xvzf" extracts that tar. Then cd to the sdk folder and you are good to go.

Speaking of compressing and uncompressing files......

tar -zxvf filename.tar.gz

Untar a tarred and compressed tarball (*.tar.gz or *.tgz).

tar -xvf filename.tar

Untar a tarred but uncompressed tarball (*.tar).

gunzip filename.gz

Decompress a zipped file (*.gz" or *.z).

bunzip2 filename.bz2

Decompress a file (*.bz2) zipped with bzip2 compression.

unzip filename.zip

Decompress a file (*.zip).

Next. Processes.

You know hiw windows has task manager with ctrl+alt+delete. Well here is that for terminal.

ps

(=print status) Display the list of currently running processes with their process IDs (PID) numbers.

kill PID

Force a process shutdown. First determine the PID. Use the command "ps".

bg PID

Send the process to the background.The same can be accomplished with z.

any_command&

Run any command in the background the symbol "&" means run the proceeding command in the background.

killall program_name

Kill program or multiple programs by name. This is useful

lpq

Shows your printing queue.

lprm job_number

Remove a printing job "job_number" from the queue. Alot like windows printing task manager.

lpc

Check and control the printer(s). Type "?" to see the list of available commands.

renice -1 PID

(as root) Change the priority of a running process to -1. Make sure you are Root.

*

Ill add more later. My fingers are tired.