Linux common query records

Foreword

  • The so-called query is to find the configuration file and output the configuration file information.

Operating system query

Current operating system version information:
  • cat /proc/version
Current operating system kernel information:
  • uname -a
Current operating system release information:
  • cat /etc/issueorcat /etc/centos-release
  • Let me mention here, centos uses the back, ubuntu is the front (debain can be checked),
  • Specifically, you can check your own system under / etc such as:
    • If it is centos then there will be: /etc/redhat-releaseAs for centos-release-upstreamwhat system is based on (centos is based on Redhat)
      Insert picture description here
    • If it is debian then there will be: /etc/os-releasealso can be found
      Insert picture description here
      Insert picture description here
cpu information query
  • The file is /proc/cpuinfo, but there are many things in it, we only need a part, so we need to delete
  • The following information we need model name then the command is:grep "model name" /proc/cpuinfo
  • Insert picture description here
  • The effect is shown in the figure, so that all the CPUs come out (of course only the model name part), if the model name is ugly, the cut command can be removed.
    Insert picture description here

CUDA & cudnn

  • cuda version:cat /usr/local/cuda/version.txt
  • cudnn version:cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
  • Insert picture description here

Recommend blog , recommend blog 2 , more comprehensive, here is a little bit of encounter

Published 136 original articles · praised 218 · 220,000 views

Guess you like

Origin blog.csdn.net/symuamua/article/details/105692953