安装lsb_release
来源:互联网 发布:excel表格数据求和为0 编辑:程序博客网 时间:2024/05/21 06:22
lsb_release命令用来查看当前系统的发行版信息(prints certain LSB (Linux Standard Base) and Distribution information.)。有了这个命令就可以清楚的知道到底是RedHat的、还是别的发行版,还有具体的版本号,比如3.4还是5.4等等。有些系统上不一定安装了这个命令,可以通过查看/etc/issue文件得到发行版信息。
[root@localhost linux-3.18.26]# cat /etc/issueCentOS release 6.6 (Final)Kernel \r on an \m
但一般这个命令用习惯了,如果没有我们可以安装一下。具体步骤如下:
1)查找哪个源包含这个命令
[root@localhost linux-3.18.26]# yum provides */lsb_releaseLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfileredhat-lsb-core-4.0-7.el6.centos.x86_64 : LSB base libraries support for CentOSRepo : ustack_custom_productsMatched from:Filename : /usr/bin/lsb_release2)从上面的输出可以看到redhat-lsb-core-4.0-7.el6.centos.x86_64这个package包含这个命令,那就安装这个包。
64ot@localhost linux-3.18.26]# yum install redhat-lsb-core-4.0-7.el6.centos.x86_Loaded plugins: fastestmirrorSetting up Install ProcessLoading mirror speeds from cached hostfileResolving Dependencies--> Running transaction check---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be installed--> Processing Dependency: perl-Test-Simple for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: perl-Test-Harness for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: perl-ExtUtils-MakeMaker for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: perl-CGI for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/time for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/pax for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/patch for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/msgfmt for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/man for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/batch for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/bin/at for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /bin/mailx for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /bin/gettext for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /bin/ed for package: redhat-lsb-core-4.0-7.el6.centos.x86_64--> Running transaction check---> Package at.x86_64 0:3.1.10-43.el6_2.1 will be installed---> Package ed.x86_64 0:1.1-3.3.el6 will be installed---> Package gettext.x86_64 0:0.17-16.el6 will be installed--> Processing Dependency: cvs for package: gettext-0.17-16.el6.x86_64---> Package mailx.x86_64 0:12.4-7.el6 will be installed---> Package man.x86_64 0:1.6f-32.el6 will be installed--> Processing Dependency: lzma for package: man-1.6f-32.el6.x86_64---> Package patch.x86_64 0:2.6-6.el6 will be installed---> Package pax.x86_64 0:3.4-10.1.el6 will be installed---> Package perl-CGI.x86_64 0:3.51-131.el6_4 will be installed---> Package perl-ExtUtils-MakeMaker.x86_64 0:6.55-131.el6_4 will be installed--> Processing Dependency: perl-devel for package: perl-ExtUtils-MakeMaker-6.55-131.el6_4.x86_64---> Package perl-Test-Harness.x86_64 0:3.17-131.el6_4 will be installed---> Package perl-Test-Simple.x86_64 0:0.92-131.el6_4 will be installed---> Package time.x86_64 0:1.7-37.1.el6 will be installed--> Running transaction check---> Package cvs.x86_64 0:1.11.23-15.el6 will be installed---> Package perl-devel.x86_64 4:5.10.1-131.el6_4 will be installed--> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.10.1-131.el6_4.x86_64---> Package xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be installed--> Running transaction check---> Package perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-131.el6_4 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================ Package Arch Version Repository Size================================================================================Installing: redhat-lsb-core x86_64 4.0-7.el6.centos ustack_custom_products 25 kInstalling for dependencies: at x86_64 3.1.10-43.el6_2.1 ustack_custom_products 60 k cvs x86_64 1.11.23-15.el6 ustack_custom_products 711 k ed x86_64 1.1-3.3.el6 ustack_custom_products 72 k gettext x86_64 0.17-16.el6 ustack_custom_products 1.8 M mailx x86_64 12.4-7.el6 ustack_custom_products 235 k man x86_64 1.6f-32.el6 ustack_custom_products 263 k patch x86_64 2.6-6.el6 ustack_custom_products 90 k pax x86_64 3.4-10.1.el6 ustack_custom_products 69 k perl-CGI x86_64 3.51-131.el6_4 ustack_custom_products 208 k perl-ExtUtils-MakeMaker x86_64 6.55-131.el6_4 ustack_custom_products 292 k perl-ExtUtils-ParseXS x86_64 1:2.2003.0-131.el6_4 ustack_custom_products 44 k perl-Test-Harness x86_64 3.17-131.el6_4 ustack_custom_products 230 k perl-Test-Simple x86_64 0.92-131.el6_4 ustack_custom_products 111 k perl-devel x86_64 4:5.10.1-131.el6_4 ustack_custom_products 421 k time x86_64 1.7-37.1.el6 ustack_custom_products 26 k xz-lzma-compat x86_64 4.999.9-0.5.beta.20091007git.el6 ustack_custom_products 16 kTransaction Summary================================================================================Install 17 Package(s)Total download size: 4.6 MInstalled size: 12 MIs this ok [y/N]: yDownloading Packages:(1/17): at-3.1.10-43.el6_2.1.x86_64.rpm | 60 kB 00:00(2/17): cvs-1.11.23-15.el6.x86_64.rpm | 711 kB 00:00(3/17): ed-1.1-3.3.el6.x86_64.rpm | 72 kB 00:00(4/17): gettext-0.17-16.el6.x86_64.rpm | 1.8 MB 00:00(5/17): mailx-12.4-7.el6.x86_64.rpm | 235 kB 00:00(6/17): man-1.6f-32.el6.x86_64.rpm | 263 kB 00:00(7/17): patch-2.6-6.el6.x86_64.rpm | 90 kB 00:00(8/17): pax-3.4-10.1.el6.x86_64.rpm | 69 kB 00:00(9/17): perl-CGI-3.51-131.el6_4.x86_64.rpm | 208 kB 00:00(10/17): perl-ExtUtils-MakeMaker-6.55-131.el6_4.x86_64.r | 292 kB 00:00(11/17): perl-ExtUtils-ParseXS-2.2003.0-131.el6_4.x86_64 | 44 kB 00:00(12/17): perl-Test-Harness-3.17-131.el6_4.x86_64.rpm | 230 kB 00:00(13/17): perl-Test-Simple-0.92-131.el6_4.x86_64.rpm | 111 kB 00:00(14/17): perl-devel-5.10.1-131.el6_4.x86_64.rpm | 421 kB 00:00(15/17): redhat-lsb-core-4.0-7.el6.centos.x86_64.rpm | 25 kB 00:00(16/17): time-1.7-37.1.el6.x86_64.rpm | 26 kB 00:00(17/17): xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6 | 16 kB 00:00--------------------------------------------------------------------------------Total 2.7 MB/s | 4.6 MB 00:01Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : 1:perl-ExtUtils-ParseXS-2.2003.0-131.el6_4.x86_64 1/17 Installing : 4:perl-devel-5.10.1-131.el6_4.x86_64 2/17 Installing : perl-Test-Harness-3.17-131.el6_4.x86_64 3/17 Installing : perl-ExtUtils-MakeMaker-6.55-131.el6_4.x86_64 4/17 Installing : perl-Test-Simple-0.92-131.el6_4.x86_64 5/17 Installing : at-3.1.10-43.el6_2.1.x86_64 6/17 Installing : time-1.7-37.1.el6.x86_64 7/17 Installing : cvs-1.11.23-15.el6.x86_64 8/17 Installing : gettext-0.17-16.el6.x86_64 9/17 Installing : perl-CGI-3.51-131.el6_4.x86_64 10/17 Installing : pax-3.4-10.1.el6.x86_64 11/17 Installing : patch-2.6-6.el6.x86_64 12/17 Installing : mailx-12.4-7.el6.x86_64 13/17 Installing : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 14/17 Installing : man-1.6f-32.el6.x86_64 15/17 Installing : ed-1.1-3.3.el6.x86_64 16/17 Installing : redhat-lsb-core-4.0-7.el6.centos.x86_64 17/17 Verifying : man-1.6f-32.el6.x86_64 1/17 Verifying : perl-Test-Harness-3.17-131.el6_4.x86_64 2/17 Verifying : ed-1.1-3.3.el6.x86_64 3/17 Verifying : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 4/17 Verifying : 1:perl-ExtUtils-ParseXS-2.2003.0-131.el6_4.x86_64 5/17 Verifying : redhat-lsb-core-4.0-7.el6.centos.x86_64 6/17 Verifying : perl-ExtUtils-MakeMaker-6.55-131.el6_4.x86_64 7/17 Verifying : mailx-12.4-7.el6.x86_64 8/17 Verifying : patch-2.6-6.el6.x86_64 9/17 Verifying : gettext-0.17-16.el6.x86_64 10/17 Verifying : pax-3.4-10.1.el6.x86_64 11/17 Verifying : perl-CGI-3.51-131.el6_4.x86_64 12/17 Verifying : cvs-1.11.23-15.el6.x86_64 13/17 Verifying : time-1.7-37.1.el6.x86_64 14/17 Verifying : perl-Test-Simple-0.92-131.el6_4.x86_64 15/17 Verifying : at-3.1.10-43.el6_2.1.x86_64 16/17 Verifying : 4:perl-devel-5.10.1-131.el6_4.x86_64 17/17Installed: redhat-lsb-core.x86_64 0:4.0-7.el6.centosDependency Installed: at.x86_64 0:3.1.10-43.el6_2.1 cvs.x86_64 0:1.11.23-15.el6 ed.x86_64 0:1.1-3.3.el6 gettext.x86_64 0:0.17-16.el6 mailx.x86_64 0:12.4-7.el6 man.x86_64 0:1.6f-32.el6 patch.x86_64 0:2.6-6.el6 pax.x86_64 0:3.4-10.1.el6 perl-CGI.x86_64 0:3.51-131.el6_4 perl-ExtUtils-MakeMaker.x86_64 0:6.55-131.el6_4 perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-131.el6_4 perl-Test-Harness.x86_64 0:3.17-131.el6_4 perl-Test-Simple.x86_64 0:0.92-131.el6_4 perl-devel.x86_64 4:5.10.1-131.el6_4 time.x86_64 0:1.7-37.1.el6 xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6Complete!3)验证命令。
[root@localhost linux-3.18.26]# lsb_release -aLSB Version::base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarchDistributor ID:CentOSDescription:CentOS release 6.6 (Final)Release:6.6Codename:Final
0 0
- lsb_release安装
- 安装lsb_release
- Fedora中lsb_release命令的安装方法
- 查看linux版本及lsb_release安装及一些想法
- 命令lsb_release
- Linux命令之lsb_release
- Linux里的lsb_release
- Linux里的lsb_release
- shell小记:lsb_release
- lsb_release: command not found 解决
- lsb_release -a 查询系统版本
- lsb_release -a 查询系统版本
- lsb_release -a 查询系统版本
- lsb_release -a 查询系统版本
- 关于linux中的lsb_release命令
- lsb_release -a 查询系统版本
- 一天一条Linux指令-lsb_release
- lsb_release: command not found解决方法
- 七个对我最重要的职业建议(译文)
- JAVA中类型转换
- 行为型模式11之1-Observer观察者模式例子理解
- WAMP服务器离线,80端口被Microsoft-HTTPAPI/2.0占用
- Hibernate之hibernate中java对象的状态
- 安装lsb_release
- 微信红包算法
- 笔记5,jQuery中的事件
- KVM架构与原理详解
- 例题6-15 UVa10305 Ordering Tasks(拓扑排序)
- 2-18学习记录
- 手机短信码使用流程
- scala学习
- 将分割的文件进行合并