Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在AmazonLinuxAMI上找到我的Linux发行版?_Linux_Amazon Web Services_Server_Linux Kernel_Redhat - Fatal编程技术网

如何在AmazonLinuxAMI上找到我的Linux发行版?

如何在AmazonLinuxAMI上找到我的Linux发行版?,linux,amazon-web-services,server,linux-kernel,redhat,Linux,Amazon Web Services,Server,Linux Kernel,Redhat,AmazonWebServices(AWS)提供了一个官方支持的AmazonMachine映像AMI,但它没有指明它基于哪个Linux发行版 在安装诸如:vagrant等软件时,我们需要Linux发行版的版本 我使用:**hostnamectl**命令,结果如下所示: Static hostname: a-1fxzvx1ww7twk Pretty hostname: A-1FXZVX1WW7TWK Icon name: computer-vm Ch

AmazonWebServices(AWS)提供了一个官方支持的AmazonMachine映像AMI,但它没有指明它基于哪个Linux发行版

在安装诸如:vagrant等软件时,我们需要Linux发行版的版本

我使用:
**hostnamectl**
命令,结果如下所示:


Static hostname: a-1fxzvx1ww7twk
   Pretty hostname: A-1FXZVX1WW7TWK
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 10c579b792b74c5bbababbcbd78df49e
           Boot ID: e444cb9e35354d53a45c28fe7384bc7f
    Virtualization: kvm
  ***Operating System: Amazon Linux 2***
       CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
            Kernel: Linux 4.14.181-142.260.amzn2.x86_64
      Architecture: x86-64

Usage: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group]
        [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires]
        [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles]
        [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT]
        [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
        [--excludedocs] [--excludepath=<path>] [--force]
        [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
        [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest]
        [--nocontexts] [--nocaps] [--noorder] [--noscripts] [--notriggers]
        [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>]
        [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test]
        [-U|--upgrade <packagefile>+] [--reinstall=<packagefile>+]
        [-D|--define 'MACRO EXPR'] [--undefine=MACRO] [-E|--eval 'EXPR']
        [--macros=<FILE:...>] [--noplugins] [--nodigest] [--nosignature]
        [--rcfile=<FILE:...>] [-r|--root ROOT] [--dbpath=DIRECTORY]
        [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
        [-?|--help] [--usage] [--scripts] [--setperms] [--setugids]
        [--setcaps] [--restore] [--conflicts] [--obsoletes] [--provides]
        [--requires] [--info] [--changelog] [--xml] [--triggers] [--last]
        [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext]
        [--fileprovide] [--filerequire] [--filecaps]

正如我们看到的,没有关于Linux发行版版本的任何信息

我还使用以下命令:pm–qa centos release,结果如下所示:


Static hostname: a-1fxzvx1ww7twk
   Pretty hostname: A-1FXZVX1WW7TWK
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 10c579b792b74c5bbababbcbd78df49e
           Boot ID: e444cb9e35354d53a45c28fe7384bc7f
    Virtualization: kvm
  ***Operating System: Amazon Linux 2***
       CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
            Kernel: Linux 4.14.181-142.260.amzn2.x86_64
      Architecture: x86-64

Usage: rpm [-aKfgpqVcdLilsiv?] [-a|--all] [-f|--file] [-g|--group]
        [-p|--package] [--pkgid] [--hdrid] [--triggeredby] [--whatrequires]
        [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles]
        [-L|--licensefiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT]
        [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
        [--excludedocs] [--excludepath=<path>] [--force]
        [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
        [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest]
        [--nocontexts] [--nocaps] [--noorder] [--noscripts] [--notriggers]
        [--nocollections] [--oldpackage] [--percent] [--prefix=<dir>]
        [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test]
        [-U|--upgrade <packagefile>+] [--reinstall=<packagefile>+]
        [-D|--define 'MACRO EXPR'] [--undefine=MACRO] [-E|--eval 'EXPR']
        [--macros=<FILE:...>] [--noplugins] [--nodigest] [--nosignature]
        [--rcfile=<FILE:...>] [-r|--root ROOT] [--dbpath=DIRECTORY]
        [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
        [-?|--help] [--usage] [--scripts] [--setperms] [--setugids]
        [--setcaps] [--restore] [--conflicts] [--obsoletes] [--provides]
        [--requires] [--info] [--changelog] [--xml] [--triggers] [--last]
        [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext]
        [--fileprovide] [--filerequire] [--filecaps]


用法:rpm[-aKfgpqVcdLilsiv?][-a |--all][f |--file][g |--group]
[-p|--package][-pkgid][-hdrid][-triggeredby][-whatrequires]
[--whatprovides][--nomanifest][c |--configfiles][d |--docfiles]
[-L |--licensefiles][--dump][L |--list][--queryformat=queryformat]
[-s |--state][--nofiledigest][--nofiles][--nodeps][--noscript]
[--allfiles][--allmatches][--badreloc][e |--erase+]
[--excludedocs][--excludepath=][--force]
[-F |--fresh+][-h |--hash][--ignorearch][--ignoreos]
[--ignoresize][i |--install][--justdb][--nodeps][--nofiledigest]
[--nocontexts][--nocaps][--noorder][--noscripts][--notriggers]
[--nocollections][--oldpackage][--percent][--prefix=]
[--relocate==][--replacefiles][--replacepkgs][--test]
[-U |--升级+][--重新安装=+]
[-D |--define'MACRO EXPR'][--undfine=MACRO][E |--eval'EXPR']
[--macros=][--noplugins][--nodigest][--nosignature]
[--rcfile=][-r |--root][--dbpath=DIRECTORY]
[--querytags][--showrc][--quiet][v|--verbose][--version]
[-?|--help][--用法][--scripts][--setperms][--setugids]
[--setcaps][--restore][--conflicts][--obsoletes][--provides]
[--requires][--info][--changelog][--xml][--triggers][--last]
[--dups][--filesbypkg][--fileclass][--filecolor][--fscontext]
[--fileprovide][--filerequire][--filecaps]
但是,我仍然看不到关于Linux发行版版本的任何信息

我把它写在下面的答案里


你知道这个提议的其他命令吗?

最后,我可以找到magic命令
**cat/proc/version**

结果是:


Linux version 4.14.181-142.260.amzn2.x86_64 (mockbuild@ip-10-0-1-132) (gcc version 7.3.1 20180712 (**Red Hat 7.3.1-8**) (GCC)) #1 SMP Wed Jun 24 19:07:39 UTC 2020

我为你搜索了基于亚马逊linux的
Amazon Linux是从Red Hat Enterprise Linux(RHEL)和CentOS发展而来的发行版