我如何知道我的服务器的操作系统?

我如何知道我的服务器的操作系统?

我通过 ssh 连接到我的共享托管服务器,我只知道它是在 Linux 下。我尝试了如下命令:cat /etc/issue/但是lsb_release -a 得到了:

$ cat /etc/issue/
No such file or directory

$ lsb_release -a
-bash: lsb_release: command not found

并且uname -a只给出:Linux .......secureserver.net 2.6.32-673.8.1.lve1.4.3.el6.x86_64 #1 SMP Wed Feb 10 08:57:30 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

gcc -v给出:

Using built-in specs. Target: x86_64-redhat-linux Configured with:
../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)

答案1

从你的输出来看,它是一个基于 redhat 的系统。您的内核名称中包含 el6 ,并且 gcc states Red Hat 4.4.7-16。这很可能意味着它是操作系统6

通常在 Red Hat 系统上,这些会提示您已安装的内容:

  • /etc/redhat-release
  • /etc/centos-release
  • uname -r=> 如果内核EL名称中带有 *,则它是 Enterprise Linux。该数字将告诉您主要发行版本

顺便说一句,您的内核不是主线内核。尽管它的名称中有 EL6,但它也有一个非常不同的版本号,并且有一个 LVE 标签。看起来这是 CentOS 的 GoDaddy 衍生版本。他们倾向于删除许多核心功能和二进制文件并将其隐藏起来,远离用户。

相关内容