[小技巧]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根文件系统中的问题 在 ...
随机推荐
- QRCode - 二维码识别与生成
来源:Yi'mouleng(@丶伊眸冷) 链接:http://t.cn/R40WxcM 前言 有关二维码的介绍,我这里不做过多说明, 可以直接去基维百科查看,附上链接QR code(https://e ...
- ios NSURLSession使用说明及后台工作流程分析
NSURLSession是iOS7中新的网络接口,它与咱们熟悉的NSURLConnection是并列的.在程序在前台时,NSURLSession与NSURLConnection可以互为替代工作.注意, ...
- Linux命令-统计文件中的字节数、字数、行数:wc
Linux系统中的wc(Word Count)命令的功能为统计指定文件中的字节数.字数.行数,并将统计结果显示输出. 1.命令格式: wc [选项]文件... 2.命令功能: 统计指定文件中的字节数. ...
- PLSQL_标准游标类型的解析(概念)
2014-06-02 Created By BaoXinjian
- Linux页面回收概述
本文主要介绍了一些page reclaim机制中的基本概念.这份文档其实也可以看成阅读ULK第17章第一小节的一个读书笔记.虽然ULK已经读了很多遍,不过每一遍还是觉得有收获.Linux内核虽然不断在 ...
- redis 基本类型
1 hashes 类型及操作 redis hash 是一个string 类型的 field 和 value 的映射表.他的添加.删除操作时间复杂度都是 O(1) 2 hset,设置 hash fiel ...
- django中models阅读笔记
一.使用数据库需要设置settings.py文件. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgre ...
- js的一些代码…
获取请求的参数 例:VisitPhoto.aspx?imgurl=http://s.cn.bing.net/az/hprichbg/rb/BottlenoseDolphinSurface_ZH-CN1 ...
- asp.net 通用的连接数据库实例代码
asp.net中数据库连接代码,有需要的朋友可以参考一下. <%@ Page Language="C#" AutoEventWireup="true" C ...
- 在Unity3D中连接WCF服务端
服务端不多讲解,有一处需要改的地方.具体服务端请看WCF入门学习2-控制台做为宿主 建议实际项目不要拿去用,毕竟是mono不是原生.net.或许是个坑 由于Unity的mono版本问题不能直接用net ...