[小技巧]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根文件系统中的问题 在 ...
随机推荐
- android API之android.text.TextWatcher
When an object of a type is attached to an Editable, its methods will be called when the text is cha ...
- .NET的多种事务处理
Oracle 的事务操作,有时候想在批量操作数据集合的时候,执行一次失败,即为了避免数据异常,将所有的操作回滚..NET给我们提供了良好的事务操作,Oracle端也有事务操作,可以灵活使用,此处介绍. ...
- Erlang中atom的实现
Erlang的原子(atom)在匹配中有着重要作用,它兼顾了可读性和运行效率. 通过atom,可以实现很多灵活高效的应用. atom可以看作是给字符串生成了一个ID,内部使用的是ID值,必要时可以取出 ...
- GFW的前世今生,一部GFW之父方滨兴的发家史
http://whu.myubbs.com/thread-96390-1-1.html方滨兴(1960年7月17日-),男,中国共chan党党员,中国工程院院士,全国人大代表,中国科学院信息工程研究所 ...
- C# -- 等待异步操作执行完成的方式 C# -- 使用委托 delegate 执行异步操作 JavaScript -- 原型:prototype的使用 DBHelper类连接数据库 MVC View中获取action、controller、area名称、参数
C# -- 等待异步操作执行完成的方式 C# -- 等待异步操作执行完成的方式 1. 等待异步操作的完成,代码实现: class Program { static void Main(string[] ...
- 程序猿修仙之路--数据结构之你是否真的懂数组? c#socket TCP同步网络通信 用lambda表达式树替代反射 ASP.NET MVC如何做一个简单的非法登录拦截
程序猿修仙之路--数据结构之你是否真的懂数组? 数据结构 但凡IT江湖侠士,算法与数据结构为必修之课.早有前辈已经明确指出:程序=算法+数据结构 .要想在之后的江湖历练中通关,数据结构必不可少. ...
- Python学习笔记010——递归函数
1 递归定义 函数直接或间接调用函数本身,则该函数称为递归函数 2 递归特点 Python函数递归调用,会用到栈 – 这里的栈是函数/程序运行时系统为其分配的一段内存区 – 栈具有 后进先出 的特性 ...
- PLSQL_统计信息系列06_统计信息的历史和日志
20150506 Created By BaoXinjian
- Struts如何获取客户端ip地址
在JSP里,获取客户端的IP地址的方法是:request.getRemoteAddr(),这种方法在大部分情况下都是有效的.但是在通过了Apache,Squid等反向代理软件就不能获取到客户端的真实I ...
- 2-String to Integer (atoi)
实现atoi这个函数, public int atoi(String str),传入字符串str可以返回整数,请仔细考虑一下字符串的各种情况! String to Integer: Case分析 正常 ...