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. (C/C++学习笔记) 四. 运算符

    四. 运算符 运算符优先级和结合性 Operator precedence and associativity (or fixity) 注意: ① 成员运算符MemberOperators可以称为点运 ...

  2. net core 获取网站目录

    AppContext.BaseDirectory 获取项目的根目录

  3. JavaWeb基础-认识JavaWeb

    程序开发体系 B/S 浏览器/服务器 开发维护成本低 客户端负载低 安全性低 C/S 客户端/服务器 成本高 客户端负载高 安全性高 javaweb简介 静态网页 HTML CSS,人浏览的数据是始终 ...

  4. 多War包合并,jetty测试

    模块间的相互依赖引用配置在pom.xml中加入要依赖的模块即可<dependency>    <groupId>com.exayong</groupId>    & ...

  5. Domination(概率DP)

    Domination 题目链接:https://odzkskevi.qnssl.com/9713ae1d3ff2cc043442f25e9a86814c?v=1531624384 Edward is ...

  6. vue-cli快速构建vue项目模板

    vue-cli 是vue.js的脚手架,用于自动生成vue.js模板工程的. 1.使用npm安装vue-cli 需要先装好vue 和 webpack(前提是已经安装了nodejs,否则连npm都用不了 ...

  7. 四、使用汇编编写LED裸机驱动

    1. 确定硬件连接 打开OK6410底板电路图,找到LED,可以发现NLEDx为0时LED点亮. 找到LED的控制引脚,发现LED控制引脚通过连接器连到了核心板: 打开核心板电路图,找到对应的连接器中 ...

  8. Vuex的学习笔记一

    以下的解释,是在知乎看到的,感觉粗俗易懂. 组件之间的作用域独立,而组件之间经常又需要传递数据. A 为父组件,下面有子组件 B 和 C. A 的数据可以通过 props 传递给 B 和 C.A 可以 ...

  9. drf 分页

    分页: 1.简单的分页: 每页显示条数: page_size = api_settings.PAGE_SIZE 查询的页码数: page_query_param = "page" ...

  10. LeetCode--122、167、169、189、217 Array(Easy)

    122. Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price ...