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 <patchfile 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 |
Linux常见使用方法
最新推荐文章于 2023-09-30 16:42:18 发布