solaris和linux命令对比
最近一个项目的系统用的是Solaris 10,虽然以前用的都是 Linux系统,但是Linux系统中的一些命令和Solaris系统是通用的,为了方便我现在列出部分,以后陆续更新。
1) 查看开放端口
Linux: netstat -atn
Solaris: netstat -P tcp -f inet -an
2) 查看网卡/网络状态
Linux: ifconfig
Solaris: ifconfig -a 或者 dladm show-dev等
注1:Linux下每个网卡都是以eth0,eth1等来命名的,而Solaris则是以网卡驱动来命名的,如rtls0, iprb0, bge0, bge1,bnx0,e1000g1,nge1,xge0等,可以通过man来查看究竟是什么网卡,比如:
# man iprb
注2:Linux在逐渐淘汰ifconfig命令,取而代之是功能更强调的iproute或者叫iproute2软件包,主要命令有ip和tc.用ifconfig给网卡添加另外一个ip,命令如下:
# ifconfig eth0:0 192.168.1.127/24 broadcast 192.168.3.255
用ip如下:
# ip addr add 192.168.1.127/24 broadcast 192.168.3.255 dev eth0
3) 查看系统安装的所有软件包
Linux: rpm -qa 或者 dpkg-query -l
Solaris: pkginfo
4) 安装软件包
Linux: rpm -ivh stardict.rpm
Solaris: pkgadd -d `pwd` SUNWstardict
5) 卸载软件包
Linux: rpm -e stardict
Solaris: pkgrm SUNWstardict
6) 查看软件包的所有安装文件
Linux: rpm -ql stardict
Solaris: pkgchk -l SUNWstardict | grep Pathname
注:在Solaris上还可以根据某一个文件来判断该文件属于哪一个安装包
# pkgchk -lp /usr/share/stardict/sounds/menushow.wav
Pathname: /usr/share/stardict/sounds/menushow.wav
Type: regular file
Expected mode: 0644
Expected owner: root
Expected group: bin
Expected file size (bytes): 6250
Expected sum(1) of contents: 60494
Expected last modification: Jul 18 11:26:00 2006
Referenced by the following packages:
SUNWstardict
Current status: installed
今天发现rpm也可以实现此功能
# rpm -qf /bin/ls
coreutils-6.
相关文档:
为了更好的解决虚拟机与主机的共享问题,VMware公司有一个VMWare-tools,来实现文件共享。这里主要讲的是在Windows下用 Vmware虚拟Linux来与windows来共享。
1、安装客户机系统,linux这里选用CentOS5
2、启动虚拟机中的Linux后,(注意必须是启动虚拟机后)。选择菜单里的VM选项,里面有一个子项是Install VM ......
嵌入式Linux下串口编程
一、配置内核
在嵌入式Linux下进行串口编程之前,先在内核中配置串口部分,如下:
Device Drivers--->
character devices--->
Serial drivers--->
&nb ......
1. wrote driver function file(s) .
2. stored in the proper folder, eg: character driver stored in folder drivers/char/
3. modified Makefile in this folder(eg: drivers/char/)
-added configuration at somewhere: type like that "obj-$(CONFIG_TESTD ......
tar vxfz ttt-1.00.tar.bz2后出现以上错误是怎么回事啊?
gzip:stdin:not in gzip format
tar:Child returned status1
tar:Error exit delayed from prvious errors
tar jxvf busybox-1.00.tar.bz2
解压:tar jxvf FileName.tar.bz2
压缩:tar jcvf FileName.tar.bz2 DirName
bz2格式用j
gz格式用z
c是创建
......