[小技巧]Linux的一些信息获取
1. Linux 系统登录之后,显示如下
Last login: Thu Jan :: UTC on ttyS0
Linux xxx 4.1. # PREEMPT Wed Jul :: CST armv7l
那么这些信息是哪里获取到的呢,比如Jul19 13:15....
Kernel每次编译的时间在源码的什么位置?
include/generated/compile.h
2. Kernel版本信息存放在源码什么位置?
include/generated/utsrelease.h
3. 如何定制自己的登录前后信息?
/etc/issue, 可以选择在这里做登录提示,或者项目标志打印, 可以选择\n \l可以看到hostname和tty登录信息
/etc/issue: 登录之前提示信息
/etc/motd: 登录之后提示信息
推荐ASCII PIC制作网站:http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20
/etc/issue – escape code The issue-file (/etc/issue or the file set with the -f option) may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed by one of the letters explained below. \b : Insert the baudrate of the current line.
\d : Insert the current date.
\s : Insert the system name, the name of the operating system.
\l : Insert the name of the current tty line.
\m : Insert the architecture identifier of the machine, eg. i486
\n : Insert the nodename of the machine, also known as the hostname.
\o : Insert the domainname of the machine.
\r : Insert the release number of the OS, eg. 1.1..
\t : Insert the current time.
\u : Insert the number of current users logged in.
\U : Insert the string “ user” or “ users” where is the number of current users logged in.
\v : Insert the version of the OS, eg. the build-date etc.
4. 如何查看系统的登录信息和一些操作log?
/var/log/auth.log
[小技巧]Linux的一些信息获取的更多相关文章
- linux的帮助信息获取以及man章节的划分
linux的帮助信息获取以及man章节的划分 linux 帮助 man 章节 linux 获取帮助的途径 (1)help (2)man (3)info command在线获取 (4)程序自带帮助文档 ...
- [小技巧]EF Core中如何获取上下文中操作过的实体
原文地址:https://www.cnblogs.com/lwqlun/p/10576443.html 作者:Lamond Lu 源代码:https://github.com/lamondlu/EFC ...
- 【Opencv 小工具】鼠标选区信息获取
有时候在目标跟踪的算法初始化工作时候,需要选区一个Rect区域,来表示要跟着的目标,所以有次小工具. 使用QT和opencv 编写 项目地址 https://github.com/wzyuliyang ...
- linux 小技巧(磁盘空间搜索)
这里记录一些linux 管理中可能会用到的又容易忘的一些小技巧. linux磁盘写入失败,提示磁盘空间不足.一般都会用df -h 或者df -i看是不是磁盘空间不足或者是inode空间不足.发生这种情 ...
- Linux小技巧scp命令
Linux服务器运维小技巧scp命令详细教程. 前言 今天给大家带来的是linux中比较实用的命令scp.善用小技巧,解决工作中的痛点. 掌握一门好的技术或者说一门好的艺术,最快捷的方式就是融入到工作 ...
- linux系统维护时的一些小技巧,包括系统挂载新磁盘的方法!可收藏!
这里发布一些平时所用到的小技巧,不多,不过会持续更新.... 1.需要将history创建硬链接ln 全盘需要备份硬链接 ln /etc/xxx /home/xxx 2.root用户不可以远程 /et ...
- Linux的95个小技巧
Linux的95个小技巧 by WEB全栈工程师 on 2012 年 03 月 27 日 这里总结了Linux使用中的一些小技巧 1.实现RedHat非正常关机的自动磁盘修复 先登录到服务器,然后在/ ...
- linux中使用top获取进程的资源占用信息
在linux中使用top获取进程的资源占用信息: Cpu(s): 1.0%us, 0.0%sy, 0.0%ni, 98.3%id, 0.7%wa, 0.0%hi, 0.0%si, 0.0 ...
- Linux及FL2440使用过程遇到的各种问题和小技巧
原文链接:http://www.cnblogs.com/NickQ/p/8900474.html ## Linux及FL2440使用过程遇到的各种问题和小技巧 关于移植linux根文件系统中的问题 在 ...
随机推荐
- 【laravel5.4】关键字【use】使用
1.在namespace 和 class 之间使用,是引入类文件的意思,命名空间过长或者类文件同名,可以使用[as]区别 2.在class 类里面使用[use],是导入trait 类的意思,多继承的 ...
- 一般web典型的项目目录结构
本文转自:http://blog.sina.com.cn/s/blog_4758a28b0100l3lp.html WebRoot- -common (系统框架公用jsp 如foote ...
- HDUOJ--------(1198)Farm Irrigation
Farm Irrigation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- 【LeetCode】44. Wildcard Matching (2 solutions)
Wildcard Matching Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any ...
- centos(7) 使用yum进行安装lamp环境
1.用yum安装Apache,Mysql,PHP. 1.1安装Apache yum install httpd httpd-devel 安装完成后,用service httpd start 1.2 安 ...
- Android学习系列(7)--App消息通知机制
有人说,程序员很安静,但我不完全同意,程序员的聒噪,是藏在代码后面,是藏在程序后面.这篇文章是Android开发人员的必备知识,是我特别为大家整理和总结的,不求完美,但是有用. 1.消息推送机制 ...
- python学习笔记——多进程间通信——Linux信号基础
1 信号的基本描述 Signal信号(其全程为软中断信号)是Linux系统编程中非常重要的概念,信号是异步进程中通信的一种方式. 作用是通知进程发生了异步事件.进程之间可以调用系统来传递信号, 本身内 ...
- Jquery定位插件,固定元素在页面某个位置,不随滚动条滚动
代码: (function ($) { "use strict"; $.fn.pin = function (options) { var scrollY = 0, element ...
- EXTJS 5 学习笔记1 - Class System
1. Name Conventions 命名规范 1) Classes 类 a. 类名只能包含数字字母 only contain alphanumeric characte ...
- PHP函数register_shutdown_function的使用示例
某些情况下,我们需要在程序执行结束时,做一些后续的处理工作,这个时候,php的register_shutdown_function函数就可以帮我们来实现这个功能. 函数简介 当PHP程序执行完成后,自 ...