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. Eclipse界面简介

    下载安装完成后,Eclipse的界面如下: (6)为eclipse的perspective(视图方案)由于安装的是for Java development的eclipse,故视图界面默认 为使用Jav ...

  2. [Leetcode 135]糖果分配 Candy

    [题目] There are N children standing in a line. Each child is assigned a rating value. You are giving ...

  3. 深入理解java虚拟机---虚拟机工具jinfo(十五)

    作用: 实时查看和调整虚拟机参数. jinfo 是jdk自带的一个工具,它可以用来查看正在运行的java应用程序的扩展参数(JVM中-X标示的参数):甚至支持在运行时修改部分参数. 1.通过以下的命令 ...

  4. window.location.replace()与window.location.href()区别

    有3个页面 a,b,c 如果当前页面是c页面,并且c页面是这样跳转过来的:a->b->c 1:b->c 是通过window.location.replace("..xx/c ...

  5. 100Mbps和100MB/s

    作为毕业2年计算机专业的学生,现在才知道100Mbps和100MB/s的概念,实在是渣. Mbps=Mbit/s即兆比特每秒.Million bits per second的缩写传输速率是指设备的的数 ...

  6. Mysql event事件用法

    公司的数据库需要进行定期删除数据,需要用到mysql event事件,学习和梳理这块知识. 1查看event是否开启 SHOW VARIABLES LIKE 'event_scheduler'; 2开 ...

  7. jdk,jre和jvm

    JDK(Java Development Kit)是针对Java开发员的产品,是整个Java的核心,包括了Java运行环境JRE.Java工具和Java基础类库 JRE是Java Runtime En ...

  8. 五、LCD屏填充纯色

    废话不说,直接上代码: lcd.c #include "lcd.h" static int PEN_COLOR = LCD_RED; /* 定义画笔(前景)颜色 */ static ...

  9. Linux:软件包安装

    软件包安装 一.rpm安装 1.挂载系统:mount /dev/cdrom/ /mnt/cdrom/ 2.进入相应的目录(Centos7 为Packages,有一些是Server):cd /mnt/c ...

  10. ubantu 安装git

    1.安装git并配置 sudo add-apt-repository ppa:git-core/ppa sudo apt-get update sudo apt-get install git 可以使 ...