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. Linux音频驱动学习之:(2)移植wm8976声卡驱动(linux-3.4.2)

    1.wm8976驱动程序: /* * wm8976.h -- WM8976 Soc Audio driver * * This program is free software; you can re ...

  2. 5.6 C++重载下标操作符

    参考:http://www.weixueyuan.net/view/6384.html 总结: 下标操作符是必须要以类的成员函数的形式进行重载的.其在类中的声明格式如下:    返回类型 & ...

  3. DevExpress v18.1新版亮点——DevExtreme篇(三)

    用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExtreme JavaScript Controls v18.1 的新功能 ...

  4. java命令提示找不到或无法加载主类

    使用java执行命令出现此错误 localhost:SocketDemo wangwei$ javac Server.java localhost:SocketDemo wangwei$ java S ...

  5. linux安装jdk、tomcat、maven、mysql

    安装SZ rz与Gcc 首先需要tomcat的jar包,打算rz上去,发现没有安装 ./configure的时候发现缺少gcc和cc 安装解决: 再次执行成功安装了sz和rz 创建软链接然后就可以使用 ...

  6. fk的使用细节

    在seiman的博客fk2.3的用法笔记一文中,介绍了当震中距很大时,fk在使用时需要加上-f,这一展平变换的选项. 另外,nt*dt为最终数据的总长度,当震中距为远震范围时,such as:40°, ...

  7. JavaScript作用域及作用域链详解、声明提升

    相信大家在入门JavaScript这门语言时对作用域.作用域链.变量声明提升这些概念肯定会稀里糊涂,下面就来说说这几个 Javascript 作用域 在 Javascript 中,只有局部作用域和全局 ...

  8. Java语法基础学习DayNine(Java集合)

    一.Java集合 1.概述 一方面,面向对象语言对事物的体现都是以对象的形式,为了方便对多个对象的操作,就需要对对象进行存储.另一方面,使用Array存储对象具有一些弊端,而Java集合就像一种容器, ...

  9. javascript前进、后退、刷新的实现

    go(-1): 返回上一页, 原页面表单中的内容会丢失; back(-1): 返回上一页, 原页表表单中的内容会保留. <input type=button value=刷新 onclick=& ...

  10. 解决VS2010使用mscomm控件无法接收数据的问题

    如果你正在使用2010,并且想用mscomm控件,遇到如下问题,那你可以看看这篇文章: 1. 添加了mscomm控件以及对应的控件变量以后发现以前mscomm的成员函数,类似setsettings() ...