Skip to content

超级基础的Linux系统的VPS检查与相关Error修复合集

ECIAP edited this page Oct 4, 2019 · 8 revisions

非常基础的检查指令合集

  • 查看当前Linux系统

    • lsb_release -a

    • 正常情况下可看见

      Distributor ID: Debian 此处Debian可以为其他系统
      
      • 运行此命令出现 -bash: lsb_release: command not found 时

         Debian:apt-get -y install wget
         Ubuntu:apt-get -y install wget
         Centos:yum -y install wget
        
  • 查看VPS虚拟化技术

    • 安装virt-what

      Debian:apt -y install virt-what
      Ubuntu:apt -y install virt-what
      Centos:yum -y install virt-what
      
      • 输入virt-what等待输出 输出内容通常为:kvm/openvz/xen/Hyper-v/... 代表意义请自行Google / Baidu / Bing
  • 简单查看内存(包含Mem 与 Swap)

    free -h
    
    • 等待输出 通常为以下格式

                total(总量)  used(已占用)free(空闲)  shared  buff/cache   available
      
    Mem:             1G         0M          1G          0K         0M          0M
    Swap:            2G         0M          2G
    
  • 简单查看硬盘

    df -h
    

Clone this wiki locally