You are on page 1of 1

Command

Description

apt_cache

Lists Cydia's package cache

apt_get

Manage Cydia packages

aptitude

Manage Cydia packages more cleanly

cat

display or concatenate files

cd

compgen
cp

Syntax
"showpkg <packageName>" shows info about a package
"dump" lists info about all packages (takes a LONG time)
"pkgnames" lists names of all packages (takes a LONG
time)
"update" reload Cydia sources
"upgrade" install all updates
"install <packageName>" installs a package
"remove <packagename>" removes a package
install - install package by name. things in Cydia repos
tend to have the com.whatever or org.whatever domain
prefixes
remove - remove package by name. same as above
update - reload sources from /etc/apt/sources.list.d/* and
/etc/apt/sources.list if it exists
upgrade - attempt to upgrade all packages. will do
dependency resolution, and present solitions if packages
conflict
safe-upgrade - like upgrade but with more dependency
resolution stuff
search - search for packages by name
on its own its a nice little ncurses GUI
cat [option] [file]

cd <directory>
"." current directory
Moves to specified directory
".." up one level
"~" home directory
More Info: http://www.cyberciti.biz/open-source/commandLists many commads
line-hacks/compgen-linux-command/
cp [option] SOURCE DEST
Copies a file or directory to a destination
cp [option] SOURCE DIRECTORY

Example Usage

Package

Repo

Repo URL

Show the name of every package Cydia knows about:


$ apt-cache pkgnames

APT 0.7 Strict

Cydia/Telesphoreo

http://apt.saurik.com/

Reload cydia sources:


# apt-get update

APT 0.7 Strict

Cydia/Telesphoreo

http://apt.saurik.com/

# aptitude search adv-cmds


# aptitude install netcat
# aptitude remove bash (don't do that)
# aptitude moo (this apt does not have super cow
powers)

Aptitude

Cydia/Telesphoreo

http://apt.saurik.com/

cat f - g Output f's contents, then standard input, then g's


contents.

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

Go to the applications directory:


$ cd ~/Applications

default

N/A

N/A

"compgen -ca" will list a lot of comands

default

N/A

N/A

$ cp "/received/song.mp3" "/music/"

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

curl

Posts HTTP requests like a boss

curl [options] <url>

Download a file from a link copied to the clipboard:


$ curl -O -L $(pbpaste 2>&1)

curl

Cydia/Telesphoreo

http://apt.saurik.com/

cycript

Objective-C <-> JavaScript bridge;


Interactive shell for that; Injects itself
into processes for debugging

cycript [-p <pid>] <script file>

Enter SpringBoard: $ cycript -p SpringBoard

cycript

Cydia/Telesphoreo

http://apt.saurik.com/

dpkg

Debian Package CLI Management

dpkg [option] [DEB PACKAGE]

Install Cydia via command line:


# dpkg -i ./cydia_1.1.9_iphoneos-arm.deb

dpkg

Cydia/Telesphoreo

http://apt.saurik.com/

echo

Prints given text, often used as input for


something else

Print "Hello World!":


$ echo "Hello World!"

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

find

Finds all files matching given attributes

findutils

Cydia/Telesphoreo

http://apt.saurik.com/

halt

Pauses all communications over


network

none

default

N/A

N/A

ifconfig

Network interface manager

iconfig [command] [arguments]

network-cmds

Cydia/Telesphoreo

http://apt.saurik.com/

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

N/A

http://apt.thebigboss.org/repofiles/cydia/

default

N/A

N/A

default

N/A

N/A

nano

Cydia/Telesphoreo

N/A

root@server# nc -l 3333 > coolpackage.deb


user@notserver$ cat coolpackage.deb | nc server 3333

netcat

Cydia/Telesphoreo

http://apt.saurik.com/

Open Safari:
$ open com.apple.mobilesafari
Download a file from a link copied to the clipboard:
$ curl -O -L $(pbpaste 2>&1)
Print an application's bundle ID:
plutil -key softwareVersionBundleId iTunesMetadata.plist

Open

BigBoss

http://apt.thebigboss.org/repofiles/cydia/

Erica Utilities

ModMyi

http://apt.modmyi.com/

Erica Utilities

ModMyi

http://apt.modmyi.com/

"<text> > <filename>" writes <text> to <filename>


"<text> > <filename>" appends <text> to <filename>,
creating it if it doesn't already exist
"-name <name>" name of the file
"-exec <command>" command to run for each found file

kill

Send a signal to a process ID

kill [signal] <pid>

killall

Send a signal to a process by its name

killall [signal] <pid>

Lists contents of current directory

-R recusrive -l long -a all files

ls
mv
nano

netcat/nc

open
pbpaste

Movers specified file or folder to a new "<file> <newLocation>" the file to move and where to move
location
it
Command-line text editor

nano [options] <file> file to edit

Like cat, but over a network

"nc -l <port> > <somefile>" - listen for an incoming


connection on <port> and save it as <somefile>
"cat <somefile> | nc <hostname or IP> <port>" - read
<somefile> and pipe it to netcat, which sends the contents
to <hostname/IP> on port <port>

Open the specified app (using com.


bundle.identifier scheme)
Pasteboard paste - prints contents (text
only) of clipboard to stderr

"<bundleID>" the bundle ID of the app


pbpaste

find all iTunesMetadata.plist files


$ find -name iTunesMetadata.plist
Pause all communications over network
# halt
List all network interfaces and some info:
$ iconfig
Kill process 1234:
$ kill 1234
Sen device:
# killall SpringBoard
List all subdirectories recursively:
$ ls -R
Move file1 to file2
$ mv ./somedir/file1 ./somedir/file2
Edit document.txt in current directory
$ nano document.txt

plutil

Reads and modifies plists

"-key <keyname>" retrieves the value of a key by name

ps

Shows currently running processes

"-A" all processes


"-M" includes security info
"-U <user>" lists processes by user

Show all running processes with useless ones trimmed


$ ps -aux

adv-cmds

BigBoss

http://apt.thebigboss.org/repofiles/cydia/

sbreload

Resprings device.

sbreload

Respring device:
# sbreload

UIKit Tools

Cydia/Telesphoreo

http://apt.saurik.com/

copy cydia.deb to device at 10.0.0.3


$ scp cydia.deb root@10.0.0.3:/root/cydia.deb

OpenSSH

Cydia/Telesphoreo

http://apt.saurik.com/

$ ssh bob@remoteserver.org

OpenSSH

Cydia/Telesphoreo

http://apt.saurik.com/

su [options] [commands] [-] [username]

$ su root
or
su (short for super user)

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

sudo <command>

Reboot the device:


$ sudo reboot

sudo

Cydia/Telesphoreo

http://apt.saurik.com/

N/A

UIKit Tools

Cydia/Telesphoreo

http://apt.saurik.com/

vim

Cydia/Telesphoreo

http://apt.saurik.com/

wget

Cydia/Telesphoreo

http://apt.saurik.com/

coreutils

Cydia/Telesphoreo

http://apt.saurik.com/

scp

Secure Copy - use SSH for file transfer

ssh

Secure SHell - useful for remote access


The su (short for substitute user)
command allows a user to become
another user. Most commonly used to
become the root user to perform
commands which require root privileges.
Somewhat similar to su -c. Allows
configurable granular access to run
specific (or all) commands as a different
user, most commonly the root user.
Can be configured (by the root user with
the visudo command) to not require any
password to run the command.
Reloads the icon cache. (so apps show
up on SpringBoard without a respring)

su

sudo

uicache
vim
wget
y

The best text editor.


Tool for downloading files from the
internet
Prints 'y'

scp [options] <infile> <outfile>


<infile> and <outfile> can be local files such as
/etc/apt/sources.list or remote files in the format
<user>@<host>:<filename>
ssh [options] [user@]<host>

uicache
vim <text file>
wget [options] <url>
y [string]

Edit document.txt in current directory


$ vim document.txt
Get google's logo:
$ wget http://www.google.com/images/srpr/logo11w.png
$ y I am awesome

You might also like