The command uname helps us in development special in scripts, see help of the uname

uname --help

Usage: uname [OPTION]...

Print certain system information.  With no OPTION, same as -s.

-a, --all                print all information, in the following order,

except omit -p and -i if unknown:

-s, --kernel-name        print the kernel name

-n, --nodename           print the network node hostname

-r, --kernel-release     print the kernel release

-v, --kernel-version     print the kernel version

-m, --machine            print the machine hardware name

-p, --processor          print the processor type or "unknown"

-i, --hardware-platform  print the hardware platform or "unknown"

-o, --operating-system   print the operating system

--help     display this help and exit

--version  output version information and exit

I use uname –r to find the current kernel release version. For example, the Makefile.

obj-m += xxx.o

all:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

When typing make, the output is

make -C /lib/modules/4.4.0-141-generic/build M=/home/??/Documents/xxx modules

uname command的更多相关文章

  1. 每天写点python

    1.收集系统信息python小程序 1 #!/usr/bin/env python 2 #A system information gathering script 3 4 import subpro ...

  2. 转:python获取linux系统及性能信息

    原文:http://amitsaha.github.io/site/notes/articles/python_linux/article.html In this article, we will ...

  3. DAY1 linux 50条命令

    1. tar压缩,解压缩 tar -cvf *** (压缩) tar -xvf ***  (解压缩) [root@bogon ~]# tar cvf test.tar test/ test/ test ...

  4. Linux Kernel Version Numbering

    Because there are numerous revisions and releases of the Linux kernel and new ones are developed at ...

  5. Cloudinsight Agent install script

    #!/bin/bash # Cloudinsight Agent install script. set -e logfile="ci-agent-install.log" gis ...

  6. Linux Kernel basics

    Linux内核作用: The Linux kernel is the heart of the operating system. It is the layer between the user w ...

  7. RH133读书笔记(10)-Lab 10 Exploring Virtualization

    Lab 10 Exploring Virtualization Goal: To explore the Xen virtualization environment and the creation ...

  8. 在centos7 部署bbr

    How to Deploy Google BBR on CentOS 7 Published on: Thu, Jan 5, 2017 at 6:34 pm EST CentOS Linux Guid ...

  9. How to Check if Linux (Ubuntu, Fedora Redhat, CentOS) is 32-bit or 64-bit

    The number of CPU instruction sets has kept growing, and likewise for the operating systems which ar ...

随机推荐

  1. substr、substring和slice的区别

    substr(start,[length])表示从start位置开始取length个字符串:substring(start,end)表示从start,到end之间的字符串,包括start位置的字符但是 ...

  2. 《图解TCP/IP》读书笔记(转)

    reference: https://www.cnblogs.com/edisonchou/p/5987827.html 一.国际惯例:书托 这是一本图文并茂的网络管理技术书籍,旨在让广大读者理解TC ...

  3. jetty域证书更新

    服务器:centos6.6 1.从正确的.pfx文件中导出.pem认证文件 #openssl pkcs12 -in example.pfx -nodes -out server.pem pfx文件可以 ...

  4. Cleartext HTTP traffic to ... not permitted

    Android下APP出现java.io.IOException: Cleartext HTTP traffic to dict.youdao.com not permitted,百度查了一下是And ...

  5. python map 常见用法

    python map 常见用法2017年02月01日 19:32:41 淇怪君 阅读数:548版权声明:欢迎转载,转载请注明出处 https://blog.csdn.net/Tifficial/art ...

  6. SNAT/DNAT

    SNAT,是源地址转换,其作用是将ip数据包的源地址转换成另外一个地址. 名词解释 编辑 SNAT,可能有人觉得奇怪,好好的为什么要进行ip地址转换啊,为了弄懂这个问题,我们要看一下局域网用户上公网的 ...

  7. [转]一文读懂《梁宁·产品思维30讲》最精华内容(含全套PPT)

    http://chuansong.me/n/2294260949029 8 年前,我的主业是产品经理,产品思维改变了我认识世界的方式,让我明白司空见惯的设计,也有其底层逻辑. 几年后我接触培训.运营自 ...

  8. 第二十六课 典型问题分析(Bugfix)

    问题1: glibc中的strdup实现如下: 没有对参数s进行空指针判断. 我们的Exception.cpp中应做改进: 在第12行进行判断空指针操作. 问题2: t1在析构时会抛出异常,我们在re ...

  9. math、numpy、pandas NaN 判断

    >> np.nan == np.nan False >> np.nan is np.nan True >> math.nan is np.nan False > ...

  10. day02编程语言介绍及python介绍

    编程语言介绍 机器语言:以二进制数为代码的编程语言,直接控制硬件运行 优点:执行效率非常快 缺点:以二进制数为编码编程,编程效率非常低下,掌握它需要深厚的硬件原理功底 汇编语言:将二进制编码用英文字符 ...