Chinaunix首页 | 论坛 | 博客
  • 博客访问: 139727
  • 博文数量: 51
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 625
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-03 15:40
文章分类
文章存档

2011年(1)

2009年(50)

我的朋友

分类: LINUX

2009-06-23 13:04:21

1.修改linux启动方式(文本方式或xwindow方式)

vi /etc/inittab,找到id:x:initdefault:一行,x=3为文本方式 x=5为xwindow方式,重启机器即可生效

2.如何退出man?

q

3.如何察看内核版本号?

uname -r

4.删除内有文件和子目录的目录?

rm -fr dir

5.如何查看系统信息?

cat /proc/meminfo(cpuinfo/pci...)

6.查看目录的大小?

du -sh dir

7.如何安装RMP软件?

rpm -ivh ***.rpm 

8.如何察看到隐藏文件?

9.在多级目录中查找某个文件的方法?

1 find /dir -name filename.ext 

2 du -a | grep filename.ext 

3 locate filename.ext 

10.用ls只列出目录?

ls -lF | grep ^d 

ls -lF | grep /$ 

ls -F | grep /$ 

11.patch的用法?

patch -p0 

12.vim中改变全文大小写的方法

光标放在全文开头

gUG 所有字母变大写

guG 所有字母变小写

g~G 所有字母,大写变小写,小写变大写

13.如何得到网卡的IP地址并修改?

Eg. ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up

14.临时修改网卡MAC地址的方法?

关闭网卡:/sbin/ifconfig eth0 down 

然后改地址:/sbin/ifconfig eth0 hw ether 00:AA:BB:CCD:EE 

然后启动网卡:/sbin/ifconfig eth0 up

阅读(1442) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~