文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > Linux终端提示符PS1设置(颜色)
侵权投诉

Linux终端提示符PS1设置(颜色)

Linux终端提示符PS1设置(颜色)

\d :代表日期,格式为weekday month date,例如:"Mon Aug 1"

\H :完整的主机名称。例如:我的机器名称为:fc4.linux,则这个名称就是fc4.linux

\h :仅取主机的第一个名字,如上例,则为fc4,.linux则被省略

\t :显示时间为24小时格式,如:HH:MM:SS

\T :显示时间为12小时格式

\A :显示时间为24小时格式:HH:MM

\u :当前用户的账号名称

\v :BASH的版本信息

\w :完整的工作目录名称。家目录会以 ~代替

\W :利用basename取得工作目录名称,所以只会列出最后一个目录 \# :下达的第几个命令

\$ :提示字符,如果是root时,提示符为:# ,普通用户则为:$

CentOS中关于这些:

\a an ASCII bell character (07)

\d the date in "Weekday Month Date" format (e.g., "Tue May 26")

\D{format} the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required

\e an ASCII escape character (033)

\h the hostname up to the first ‘.’

\H the hostname

\j the number of jobs currently managed by the shell

\l the basename of the shell’s terminal device name

\n newline

\r carriage return

\s the name of the shell, the basename of $0 (the portion following the final slash)

\t the current time in 24-hour HH:MM:SS format

\T the current time in 12-hour HH:MM:SS format

\@ the current time in 12-hour am/pm format

\A the current time in 24-hour HH:MM format

\u the username of the current user

\v the version of bash (e.g., 2.00)

\V the release of bash, version + patch level (e.g., 2.00.0)

\w the current working directory, with $HOME abbreviated with a tilde \W the basename of the current working directory, with $HOME abbreviated with a tilde

\! the history number of this command

\# the command number of this command

第1页

你可能喜欢

热门文档

相关文档

  • Linux终端提示符PS1设置

    Linux终端提示符PS1设置_IT/计算机_专业资料。Linux终端提示符PS1设置Linux 终端提示符 PS1 设置(颜色) \d :代表日期,格式为 weekday month date,例如:"Mon ...

  • 改变linux终端颜色

    改变linux终端颜色_计算机软件及应用_IT/计算机_专业资料。操作系统实践linux相关...提示行基础 在 bash 下,可以通过更改 PS1 环境变量的值来设置提示行, 如下所...

  • 修改Linux提示符

    在 PS1 中设置字符序列颜色的格式为: \[\e[F;Bm\] 其中``F''为字体... Linux终端提示符PS1设置 8页 1下载券 Linux终端提示符PS1设置... 2页 1...

  • linux终端操作

    第二章 Linux终端操作 60页 免费 linux设置文本终端颜色 1页 1下载券 基于Linux的移动终端操作... 暂无评价 5页 3.00 Linux终端提示符PS1设置 8页 1...

  • linux ps1的设置

    $ 如果想要设置终端提示符的样式只要 前景 30 31 32 33 34 35 36 37 背景...[LinuxSong@test ~]$ 在 PS1 中设置字符序列颜色的格式为:/[/e[F;Bm/]...

  • linux终端有颜色字体

    Linux 下 Shell 脚本输出带颜色文字文本终端的颜色可以使用“ANSI 非常规字符序列... Linux终端,历史命令,用户... 2页 1下载券 Linux终端提示符PS1设置... 2页...

  • Linux定制友好的shell终端

    Linux定制友好的shell终端_IT/计算机_专业资料。教你定制shell终端的详细设置。讲解浅显详尽。一、显示全路径二、修改shell提示符颜色三、修改ls输出颜色...

  • linux终端显示的颜色

    改变linux终端颜色[ 暂无评价 2页 1下载券 Linux终端提示符PS1设置... 2页...现linux终端显示字符的...

  • Linux 终端控制台字体颜色

    Linux 终端控制台字体颜色_计算机软件及应用_IT/计算机_专业资料。引言: 由于...然后恢复默认设置。 应用 2:用控制台输出彩色字或彩色背景 echo -e "\033[...

  • Linux-PS1

    Linux-PS1_IT/计算机_专业资料。Linux PS的设置Linux 系统提示符是用系统变量... Linux终端提示符PS1设置 8页 1下载券 Linux终端提示符PS1设置... 2页 1...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email