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的一些信息获取的更多相关文章

  1. linux的帮助信息获取以及man章节的划分

    linux的帮助信息获取以及man章节的划分 linux 帮助 man 章节 linux 获取帮助的途径 (1)help (2)man (3)info command在线获取 (4)程序自带帮助文档 ...

  2. [小技巧]EF Core中如何获取上下文中操作过的实体

    原文地址:https://www.cnblogs.com/lwqlun/p/10576443.html 作者:Lamond Lu 源代码:https://github.com/lamondlu/EFC ...

  3. 【Opencv 小工具】鼠标选区信息获取

    有时候在目标跟踪的算法初始化工作时候,需要选区一个Rect区域,来表示要跟着的目标,所以有次小工具. 使用QT和opencv 编写 项目地址 https://github.com/wzyuliyang ...

  4. linux 小技巧(磁盘空间搜索)

    这里记录一些linux 管理中可能会用到的又容易忘的一些小技巧. linux磁盘写入失败,提示磁盘空间不足.一般都会用df -h 或者df -i看是不是磁盘空间不足或者是inode空间不足.发生这种情 ...

  5. Linux小技巧scp命令

    Linux服务器运维小技巧scp命令详细教程. 前言 今天给大家带来的是linux中比较实用的命令scp.善用小技巧,解决工作中的痛点. 掌握一门好的技术或者说一门好的艺术,最快捷的方式就是融入到工作 ...

  6. linux系统维护时的一些小技巧,包括系统挂载新磁盘的方法!可收藏!

    这里发布一些平时所用到的小技巧,不多,不过会持续更新.... 1.需要将history创建硬链接ln 全盘需要备份硬链接 ln /etc/xxx /home/xxx 2.root用户不可以远程 /et ...

  7. Linux的95个小技巧

    Linux的95个小技巧 by WEB全栈工程师 on 2012 年 03 月 27 日 这里总结了Linux使用中的一些小技巧 1.实现RedHat非正常关机的自动磁盘修复 先登录到服务器,然后在/ ...

  8. 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 ...

  9. Linux及FL2440使用过程遇到的各种问题和小技巧

    原文链接:http://www.cnblogs.com/NickQ/p/8900474.html ## Linux及FL2440使用过程遇到的各种问题和小技巧 关于移植linux根文件系统中的问题 在 ...

随机推荐

  1. 有用的git片段

    世界上知识那么多,又岂是人力所能穷尽,于是术业有专攻.对于git,有用的命令片段其实非常少,而命令却是非常多.于是,掌握git常见的用法就足够了.不要在语句级别上记忆git命令,在代码片段级别上记忆g ...

  2. Squid调试和故障处理

    http://blog.zhdata.com/tag/squid第16章 调试和故障处理 16.1 一些通用问题 在讨论通用debug前,我先提起一些经常发生的问题. 16.1.1 “Failed t ...

  3. Wunderlist 云端任务管理(Todo list)工具

    Wunderlist 是一个云端任务管理(Todo list)工具,支持 iPhone, iPad, Android, Windows, Mac OSX 以及 Web 端轻松同步,实现了真正意义上的跨 ...

  4. POJ 1836 Alignment (双向DP)

    Alignment Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 10804   Accepted: 3464 Descri ...

  5. Android开发学习之Activity的简介

    1.Activity的概念介绍 Activity是Android组件中最基本也是最常用的一种组件,在一个Android应用中,一个Activity通常就是一个单独的屏幕.每一个Activity都被实现 ...

  6. Unix环境高级编程(九)信号

    信号时软中断,很多比较重要的应用程序都需要处理信号,信号提供了一种处理异步事件的方法.每个信号都一个名字,以SIG开头,在<signal.h>头文件中定义信号类型,都是正整数(信号编号). ...

  7. 利用WGET下载文件,并保存到指定目录

    wget是Linux上一个非常不错的下载指令,也算是Linux工作者常用的指令之一 而这个指令我想在各大系统都预设有提供,包括了Ubuntu.Fedora等,而一般来说,要使用wget下载档案,只需要 ...

  8. python 异步编程

    Python 3.5 协程究竟是个啥 Yushneng · Mar 10th, 2016 原文链接 : How the heck does async/await work in Python 3.5 ...

  9. 强制删除一个Windows服务

    一个挂起的服务如下图所示,该服务相关的所有按钮都被禁用,包括启动.停止.暂停和恢复. 要停止这个服务,首先记住这个服务的名称,在这里是 ‘EntropySoftCFS’. 然后打开命令行窗口,运行 s ...

  10. TreeMap升序|降序排列和按照value进行排序

    TreeMap 升序|降序排列 import java.util.Comparator; import java.util.TreeMap; public class Main { public st ...