Apple:如何在iphone、ipad上安装一些常用命令行命令
相信对Linux、Unix比较熟悉的朋友,在iphone或 ipad越狱后发现通过Cydia可以安装OpenSSH,一定都想安装上并且通过ssh登录上去看看,但是登录后却发现几乎没几个命令可用,也就只有ls、cd等一些常用的命令,至于ifconfig、ping、netstat等都没有。。。
下面就来介绍一下如何让iphone或 ipad拥有Linux、Unix常用的命令。
1、首先你的iphone或 ipad得先越狱,越狱后才有Cydia,才能安装OpenSSH。
2、记住在使用Cydia的时候,要选择“Developer”(开发者),如果一开始选择的是“User”,可以进入Cydia->Sources->Settings->Developer进行修改,否则搜索不到这些软件包。
3、安装并启动sshd后,通过ssh -l root IPAD_IP_ADDRESS登录,默认口令是:alpine,这是ios系统默认的root密码,记得及时修改。当然如果可以不用这么启动,其实只要安装openssh后,服务就会默认启动的。如果没有可以像Windows一样重启设备也可以。
4、下面就是一些软件包的名字:
adv-cmds #finger,fingerd,last,lsvfs,md,ps
basic-cmds #msg,uudecode,uuencode,write
bc #计算器工具
cURL #就是curl了
Diff Utilities #diff
diskdev-cmds #mount,quota,fsck等,忘记是否默认安装的
file #常用的file命令
file-cmds #chflags,compress
Find Utilites #find
Gawk #awk
grep #grep
inetutils #ftp,inetd,ping,telnet…
less #less
links #links,文本浏览器
lsof #lsof
netcat #nc
network-cmds #arp,ifconfig,route,traceroute
ngrep #ngrep (Network grep).
Nmap #nmap
rsync #rsync
Screen #screen
sed #sed
shell-cmds #killall,mktemp,time,which
system-cmds #iostat,login,sync,sysctl
tcpdump #tcpdump
top #top
unrar #unrar备用
unzip #unzip
VI IMproved #vim
wget #wget
whois #whois
注意:以下内容都很重要!
其实ios系统属于unix系统分支BSD系统的一支:“Darwin”系统。
例如我的iphone 4:
login as: root
root@192.168.91.34's password:
tutengyidumato-iPhone:~ root# uname -a
Darwin tutengyidumato-iPhone 11.0.0 Darwin Kernel Version 11.0.0: Tue Nov 1 20:33:58 PDT 2011; root:xnu-1878.4.46~1/RELEASE_ARM_S5L8930X iPhone3,1 arm N90AP Darwin
tutengyidumato-iPhone:~ root# uname -r
11.0.0
tutengyidumato-iPhone:~ root# hostname
tutengyidumato-iPhone
tutengyidumato-iPhone:~ root#信息说明:
以上信息显示,
系统以版本:11.0.0;
系统生成时间:Tue Nov 1 20:33:58 PDT 2011
内核版本:xnu-1878.4.46~1/RELEASE_ARM_S5L8930X iPhone3,1 arm N90AP Darwin
主机名:tutengyidumato-iPhone。
既然同属于BSD系统,那么就会有其相同特征和命令使用方法,比如使用apt-get命令。这个命令可以再cydia中安装,只要在搜索中输入apt字符,就会显示出关于apt命令的所有软件包,如果是标记命令行软件包的,安装即可,就会安装上apt-get。
安装apt-get后,其实不用再在cydia中搜索以上命令的软件包了。只要使用如下格式:
例如:ipad2上面测试当前网络,无论是3g还是wifi是否可用,该怎么办?其实很简单,像Windows一样使用ping命令进行测试即可:
操作如下:
zhouzhoumato-iPad:~ root# uname -a
Darwin zhouzhoumato-iPad 11.0.0 Darwin Kernel Version 11.0.0: Tue Nov 1 20:34:16 PDT 2011; root:xnu-1878.4.46~1/RELEASE_ARM_S5L8940X iPad2,1 arm K93AP Darwin
zhouzhoumato-iPad:~ root# uname -r
11.0.0
zhouzhoumato-iPad:~ root# hostname
-sh: hostname: command not found
zhouzhoumato-iPad:~ root#
上面信息显示:当前的ipad2设备连hostname都没有,所以首先安装一个hostname命令测试一下:
zhouzhoumato-iPad:~ root# apt-get install hostname
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting inetutils instead of hostname
The following NEW packages will be installed:
inetutils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/212kB of archives.
After this operation, 889kB of additional disk space will be used.
Selecting previously deselected package inetutils.
(Reading database ...
dpkg: serious warning: files list file for package `com.chronic-dev.greenpois0n.corona' missing, assuming package has no files currently installed.
2261 files and directories currently installed.)
Unpacking inetutils (from .../inetutils_1.6-8_iphoneos-arm.deb) ...
Setting up inetutils (1.6-8) ...
zhouzhoumato-iPad:~ root#
安装ping命令:
zhouzhoumato-iPad:~ root# apt-get install ping
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting inetutils instead of ping
The following NEW packages will be installed:
inetutils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/212kB of archives.
After this operation, 889kB of additional disk space will be used.
Selecting previously deselected package inetutils.
(Reading database ...
dpkg: serious warning: files list file for package `com.chronic-dev.greenpois0n.corona' missing, assuming package has no files currently installed.
2261 files and directories currently installed.)
Unpacking inetutils (from .../inetutils_1.6-8_iphoneos-arm.deb) ...
Setting up inetutils (1.6-8) ...
测试ping命令:
zhouzhoumato-iPad:~ root# ping
ping: missing host operand
Try `ping --help' or `ping --usage' for more information.
zhouzhoumato-iPad:~ root#
说明命令已经安装成功了。
使用ping命令测试网络:
zhouzhoumato-iPad:~ root# ping www.baidu.com
PING www.a.shifen.com (119.75.218.77): 56 data bytes
64 bytes from 119.75.218.77: icmp_seq=0 ttl=52 time=31.919 ms
64 bytes from 119.75.218.77: icmp_seq=1 ttl=52 time=40.037 ms
^C--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 31.919/35.978/40.037/4.059 ms
zhouzhoumato-iPad:~ root#
使用apt-get的一些操作:
所以使用apt-get去执行一些相关的安装、更新、删除软件的动作很方便。这样更新安装后iphone或ipad就可以像完整的linux系统一样工作了。
apt-get的安装: apt-get install 软件包名
apt-get的更新:apt-get update 软件包名
apt-get的删除:apt-get remove 软件包名
总结:
既然可以如此操作iphone、或ipad,那么如何在命令行模式下对iphone或ipad进行启动、关闭,播放等操作呢?
转:http://blog.sina.com.cn/s/blog_51d3553f0100xrxz.html
- 大小: 70.2 KB
分享到:
相关推荐
iOS 10 SDK Development: Creating iPhone and iPad Apps with Swift by Chris Adamson English | 24 Mar. 2017 | ASIN: B071RRCK9R | 264 Pages | AZW3 | 5.24 MB All in on Swift! iOS 10 and Xcode 8 make it ...
iOS 9 SDK Development: Creating iPhone and iPad Apps with Swift English | ISBN: 1680501321 | 2016 iOS 9 gives developers new tools for creating apps for iPhone and iPad, and our new edition of the ...
A Learner’s Guide to Creating Objective-C Applications for the iPhone and iPad Book Description : Let’s say you have a killer app idea for iPhone and iPad. Where do you begin? Head First iPhone and...
iOS型号清单iOS设备型号的最终列表-标识具有Apple Silicon的iPhone,iPad,iPod touch,Apple Watch,Apple TV和Mac计算机的型号。 :rocket: 您可以在捕获最新的模型列表列表预览(JSON): { " AppleTV2,1 " : " ...
NULL 博文链接:https://tonylian.iteye.com/blog/1533604
pymobiledevice pymobiledevice是移动设备库的跨平台实现,它讨论支持iPhone:registered:,iPodTouch:registered:,iPad:registered:和AppleTV:registered:设备的协议。要求Python 2.7和3.x M2加密构造> = 2.9.29 ...
隆重推荐一款新的苹果设备管理工具iTools,它只有700K、完全绿色、像iTunes一般安全,并且使用非常方便。 每个人都很难理解为什么...也正因此让危险的91手机助手依然活跃在玩家中,即使白苹果也不去忍受iTunes的变态。
苹果M1 Minecraft启动器 在没有启动器的情况下下载并运行Minecraft。 使用说明 该程序包没有可视界面,必须从命令行运行。 将来,我计划发布带有接口的版本,但是目前存在一些技术挑战,这些挑战不值得解决。 安装...
书中结合消费类设备上常见的实例,循序渐进地讲解了iPhone开发的基本流程,并介绍了最先进、时尚、受欢迎的iPhone特性。.(china-pub.com) 英文介绍:Are you a programmer looking for a new challenge? Does the ...
命令行下的BadApple.zip
iPhoneFolder ipad iphone连接电脑查看文件
此应用程序最适合当前在iPhone 12 Pro / Max和iPad Pro 2020上可用的Apple LiDAR扫描仪版本记录最新稳定版本: (不适用) 最新测试版: (不适用) 当前的Alpha版本: ( )兼容性该应用在以下设备上效果最佳: ...
More iPhone 3 Development: Tackling iPhone SDK 3 digs deeper into Apple’s latest SDK. Best-selling authors Dave Mark and Jeff LaMarche explain concepts as only they can, covering topics like Core ...
apple设备发现无线接入点,包括隐藏的没有广播的接入点。快来试试吧。
:rocket: 安装 :red_apple: 苹果系统只需运行以下命令: brew install rootly-io/homebrew-tap/rootly :penguin: Linux和 :desktop_computer: 视窗您可以从最新版本中获取二进制文件或运行以下shell脚本: cu
资源Apple:不愧是我_46实用知识库分享知识分享
The book starts with the basics, walking you through the process of downloading and installing Apple's free iPhone SDK, then stepping you though the creation of your first simple iPhone application....
详细介绍iphone、ipad的发展历史,介绍他们的使用方法和破解方法,以及高级应用技巧
diskii-the-tool是用于处理Apple II磁盘映像的命令行工具。 鉴于已经完成了所有工作,所以这不是绝对必要的。 但是,这是我的。 次要优点(现在)是可以复制的二进制文件(无需Java),对NakedOS磁盘上的Super-Mon...