在linux中,怎?查看系统的版本,怎?查看自己用过的历史命令


几种查看linux版本信息的方法:
1. uname -a
2. cat /proc/version
3. cat /etc/issue
4. lsb_release -a

详解 lsb_release -a

1. 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:
1. [root@3.5.5Biz-46 ~]# lsb_release -a
2. LSB Version: 1.3
3. Distributor ID: RedHatEnterpriseAS
4. Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
5. Release: 4
6. Codename: NahantUpdate1
7. [root@3.5.5Biz-46 ~]#
这个命令孙帆缺适用于所有的linux,包括Redhat、SuSE、Debian等发行版

在每个用户的家目录里轿悔,看文本命令很多,如:则辩 cat \ more \ less \ vi 等等这些命令都可以看某个用户的 .bash_history 文件。

例:# more ~user/.bash_history 看 user 用户的历史命令,但是你要访问的权限才行。

忘说了,看的是上次的历史命令 :em02:
uname -a:
cat /etc/issue
cat /proc/version
第一个通用,显示轮春渣结果最简单,常用于腊悄shell编程获取系统版本信息

使用过的命令森姿可用histroy试试吧
查看系统版本可以用uname -r
历史命令可以用history命令
怎?查看系统的版本
uname -a
查看自己用渣轿过的历胡源史命裤梁态令
history