, 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
/profile file and insert the following content at the end of the file:
_________________________________________________
# Add by zws
# Customize less
# LESS = '-M-Q-R'
PS1 = "[\ u @ \ h \ w] \ $"
INPUTRC =/etc/inputrc
LESS = '-M-R' #-r for ls | less supports color.
LESSEDIT = "% E? Lt + % lt. % f"
LESSOPEN = "| lesspipe. sh % s"
LESSCHARSET = latin1
PAGER = less
Export LESS LESSEDIT LESSOPEN LESSCHARSET INPUTRC
_______________________________________
deleted the email with subject $ ($individualEmail. Subject) from $Mailbox "}}}#=============================== script end ===== =============================================== 7 to perform bulk deletion of a specified topic list message The Saves the above script as a. PS1 script, which is saved as EWS01.PS1 in this example. Next, create a ACTION_EWS.PS1 script to invoke the Ews01.
1, let the bash command line display the current branch and show the submission status and use different color highlighting to distinguish:650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7A/07/wKiom1ahAZSStKCoAABFTGH-2c4417.png "title=" 1.png " alt= "Wkiom1ahazsstkcoaabftgh-2c4417.png"/>After entering the working directory of Git, display the name of the current branchIf there is a version that has been tracked without staging, use the red * hintIf you have a tracked uncommitted versi
and Andy Gavin together for the PS1 to write the game "The Ancient Wolf" (Crash Bandicoot).At the time, Ram remained the main problem. PS1 only has 2MB of RAM, however we have to do something crazy to make the game fit the hardware. Our game data is about 10MB in size, so we have to do dynamic paging input and output (paged in and out dynamically), although the load lag frame rate drops to 30Hz, but we don
How to modify a Linux Command Prompt
How to modify the Linux Command Prompt:Modify the Linux Command Prompt to modify the Linux environment variable PS1. You can use VI to edit the/etc/profile file and add:Export PS1 = '[\ U @ \ H \ W] \ $'You can also edit it ~ /. Profile file (note the first line #/etc/profile ~ /. Profile)Where \ U shows the current user account, \ h shows the current host name, \ W show
Profile or environment. You can configure one of them.
Profile:
#/Etc/profile: System-wide. profile file for the Bourne shell (SH (1 ))
# And Bourne compatible shells (bash (1), KSh (1), ash (1),...). If ["$ PS1"]; then
If ["$ Bash"]; then
PS1 = '\ U @ \ H: \ W \ $'
If [-F/etc/bash. bashrc]; then
./Etc/bash. bashrc
Fi
Else
If ["'id-U'"-EQ 0]; then
PS1 = '#'
Els
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.