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. asp.net mvc 获取ajax的 request payload 参数

    注意事项: 传输的格式要设置城:"contentType": "application/x-www-form-urlencoded"

  2. SQL-28 查找描述信息中包括robot的电影对应的分类名称以及电影数目,而且还需要该分类对应电影数量>=5部

    题目描述 film表 字段 说明 film_id 电影id title 电影名称 description 电影描述信息 CREATE TABLE IF NOT EXISTS film ( film_i ...

  3. java中String的equals()和 ==

    String a=new String("java"); String b=new String("java"); System.out.println(a.e ...

  4. 基于session做的权限控制

    一直听说做权限将登陆信息放在session中,实际也说不太出个所以然来,幸运在工作当中接触到了对应的代码的copy. 实现思路: 类似于粗粒度的权限控制 将权限控制的文件按包分隔好,对应的url前缀也 ...

  5. 四川省赛 SCU - 4438

    Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text pp. Her j ...

  6. navicat premium 连接出现的问题

    1.listener does not currently know of service requested in connect descriptor 2.问题截图: 3.问题原因:服务名或者SI ...

  7. Mysql数据库文件迁移并修改默认数据文件存储位置

    环境: 1.两台Win10电脑 2.MySql5.6 过程: 1.原电脑停止MySql服务 2.复制C:\ProgramData\MySQL\MySQL Server 5.6\data文件夹到目标电脑 ...

  8. SQL注入之Sqli-labs系列第二十一关(基于复杂性的cookie POST报错注入)和二十二关(基于双引号的cookie POST报错注入)

    开始挑战第二十一关(Cookie Injection- Error Based- complex - string) 和二十二关(Cookie Injection- Error Based- Doub ...

  9. json与cjson

    json安装: http://blog.csdn.net/u011641885/article/details/46755225 tar xvf json-c-0.9.tar.gz cd json-c ...

  10. makefile 使用 Tricks

    .phony是表示目标是伪目标,并不生成相应的文件..phony标志的文件总是执行的. 1. 短横(-)与@ @(常用在 echo 之前):make 在执行编译打包等命令前会在命令行输出此命令,称之为 ...