常用Linux命令总结

1、查看linux内核版本号

命令:uname -a

显示:Linux localhost 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

2、查看linux版本信息

命令:lsb_release -a

显示:LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final

3、查看ip地址信息

命令:ip addr

显示:1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether xx:xx:xx:xx:xx:xxbrd ff:ff:ff:ff:ff:ff
inet 192.168.1.34/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.63/32 scope global eth0
inet6 fe80::xxx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever

5、检查是否已安装mysql

命令:rpm -qa|grep -i mysql

显示:mysql-libs-5.1.71-1.el6.x86_64

说明已经安装了mysql库文件

6、卸载已安装的mysql库文件

命令:rpm -e mysql-libs-5.1.71-1.el6.x86_64 –nodeps

显示:无

7、  在linux shell上传下载文件(CentOS)

安装lrzsz:yum install lrzsz

上传文件:rz

下载文件:sz 路径名/文件名

显示:无

《常用Linux命令总结》有2个想法

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.