of the color display) 5 set flashing 7 set reverse image 22 set general density 24 turn off underline 25 turn off blinking 27 turn off reverse image 30 set black foreground 31 set red foreground 32 set green foreground 33 set brown foreground 34 set blue foreground 35 set purple foreground 36 set cyan foreground 37 set white foreground 38 set underline on default foreground color 39 disable underline on default foreground color 40 set black background 41 set red background 42 set green backgrou
. The message segment is syn=1,ack=0,seq=x in the head. After the request is sent, the client enters the syn-sent state.* PS1:SYN=1,ACK=0表示该报文段为连接请求报文。* PS2:x为本次TCP通信的字节流的初始序号。TCP regulation: Syn=1 message segment can not have data parts, but to consume a sequence number.Second handshakeAfter the server receives the connection request message segment, if the connection is agreed, a reply is sent: Syn=1,ack=1,seq=y,ack=x+1.When the answer is sent, it e
There are many system variables in the Linux system, so where do these variables exist? Why do users automatically have these variables when they log on to the shell? Several configuration files are described below.1,/etc/profile: This file presets a few important variables, such as path, USER, LOGNAME, MAIL, INPUTRC, HOSTNAME, Histsize, Umask, and so on. You can edit the file to add variables to this file, but this is not recommended. If you need to change a variable or add a variable we can cr
, along with our custom variables, are declared.How do I set a variable in front of you, and what if I want to cancel a variable? Just enter "unset variable name".With unset ABC, the Echo $abc will no longer output any content." configuration files for system environment variables and personal environment variables "It says a lot about the variables of the system, so where are these variables stored in the Linux system, and why do users automatically have these variables when they log on to the
.) Color_prompt=yes else color_prompt= fifiif ["$color _prompt" = yes]; Then ps1= ' ${debian_chroot:+ ($debian _chroot)}\[\033[01;32m\]\[emailprotected]\h\[\033[00m\]:\[\033[01;34m\ ]\w\[\033[00m\]\$ ' Else ps1= ' ${debian_chroot:+ ($debian _chroot)}\[emailprotected]\h:\w\$ ' Fiunset color_ Prompt force_color_prompt# If This was an xterm set the TITle to [emailprotected]:d ircase "$TERM" inxterm*|rxvt*)
\007 beep of the hair bee
#######################
How to change the font and background color of Redhat:
Command:
Ps1= "[\e[32;1m\[email protected]\h \w]\\$"
Or
Export ps1= "[\e[32;1m\[email protected]\h \w]\\$" The difference between the two see the relevant information about the environment variables
Explain:
\e[32;1m: This is the escape character that controls the font and background color, 30~37 i
the Linux system, and why do users automatically have these variables when they log on to the shell?/etc/profile: This file presets several important variables, such as path, USER, LOGNAME, MAIL, INPUTRC, HOSTNAME, Histsize, UMAs, and so on./ETC/BASHRC: This file is mainly preset umask and PS1. This PS1 is the string of characters we have in front of the command, such as the author's Linux system
$ every time? A bit too tired, okay, you can put $? Put in the hint character go:[Email protected] ~ $ export ps1= "[\$?] ${PS1} "[0] [Email protected] ~ $Export ps1= "[\$?] ${PS1} "This command put $? The value is placed at the top of the prompt, so that each time the command is executed, the value will be automatica
(0) write in frontSome nouns may need to be explained. (You can also look at this section first, see the doubts later on the explanation)Launch bash Shell: A bash shell process is started, which is usually understood to be opening a terminal. Note that if you enter SH after the terminal will find yourself into another interactive interface, this time actually fork a shell sub-process, if you enter an SH in this interactive interface, then the equivalent of the fork shell sub-process and fork a s
1. Show only Current directoryVim ~/.BASHRCFind Location:if " $color _prompt " Then PS1= ' Else PS1 = ' ' fiReplace the two lowercase w with the upper case W, then source ~/.BASHRC2. Terminal color beautificationVim ~/.BASHRC then this line of comment is removed, open the switch of this variable, you can use the color command line prompt# Force_color_prompt=yesThe effect of turning off Force_color
1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:1 cat ~/2# BASHRC34# User specific aliases and functions 56# Source Global Definitions7ifthen8 . /etc/BASHRC9fi2. shell command prompt and color is configured by PS1:1 Echo $PS 1 2 \[\e[, 40m\][\[email protected]\h \w]$\e[mThe parameters commonly used in
mailbox to see if there are any new messages
PS1: Prompt settings
$: Now this Shell's PID
?: The return code that just completed the command. 0 is correct, non 0 is wrong
E. Variable keyboard reads (read)Syntax: Read [-pt] VarOptions and Parameters:-P: To follow the prompts-T: followed by a description of the wait inputExample:
Copy Code code as follows:
[Plain] View plaincopyprint?
[Root@bogon ~]# Read atest
This is
://blog.mcuol.com/User/For_ATIW/Article/11709_1.htm, and the method described below only takes effect in one terminal, another opens a new terminal to discover path or the original path. To permanently change path See the introduction at the end of this article ~
PS1: The method of directly modifying the contents of the file has not been attempted-for Method 1, because the files installed under the virtual machine do not have root rights to modify t
of the operation is different because of a particular particularity of the string as it is defined, ");Console.WriteLine ("That is, declaring initialization differs from regular classes, does not require constructors to be constructed, so the difference in performance hides its essence from being in the same reference");Console.WriteLine ("The same attribute of the general class of the type, the assignment process of string, that is, the memory address of a string object is given an incoming co
symbol, or if they prefer to define a prompt themselves, simply modify the value of the PS1 variable. For example, change it to:ps1= "Enter a command:"The second-level prompt is displayed when bash requires users to enter more information for the execution of a command. The second level prompts Fummer to think >. If you need to define the prompt yourself, simply change the value of the PS2 variable. For example, change it to:ps2= "More information:"T
(ClassNotFoundException e) {106//TODO auto-generated catch block 107 e.printstacktrace (); 108} catch (SQLException E) {109//TODO auto-generated catch Block E.printstacktrace () 111}}*/113} 6: Here directly in the main method inside the test, so write a userdao to test, see the effect can be. 1 packageCom.bie.dao; 2 3 ImportJava.sql.Connection; 4 ImportJava.sql.PreparedStatement; 5 ImportJava.sql.SQLException; 6 7 ImportCom.bie.utils.BaseDao; 8 9/** * @author Biehongli * @versi
1. Set the environment variable histsize so that it can save 10,000 command history.Vim/etc/profile changed histsize=1000 to histsize=100002. Why does setting PS1 (ps1= "[\[email protected]\h \w]\$") show a different result than we expected, and how do I set it to restore the original default?should be ps1= ' [\[email protected]\h \w]\$ '3. Find ways to replace a
represents the current user (available WhoAmI query), followed by the hostname (available hostname query), ~ location is the path where the current user of the window resides. Examples are as follows:[Email protected] ~]$ ==oldboy is the current user, backup is the hostname, ~ indicates the current directory, that is, home directory.6) The Linux command prompt is controlled by the PS1 environment variable. Examples are as follows:[[Email protected] ~
A long list is displayed by default in front of the Linux terminal, such as:[Email protected] dir]$This is determined by the PS1 environment variable:[Email protected] dir]$ echo $PS 1[\[email protected]\h \w]\$Where \u represents the user, \h represents the host, \w represents the directoryThere are three ways to modify environment variables:1. Direct modification, only works for the current shell[[email protected] dir] $PS 1= ' [\[email protected] \
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.