[Email protected]:~$ vim. BASHRC ps1= ' ${debian_chroot:+ ($debian _chroot)}\[email protected]\033[1;33mhttp:// 990487026.blog.51cto.com\e[m\w\$ 'Save, create a new window:Look at the effect:650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/83/B8/wKiom1d7OeTDs4mHAAAV8u1xAgI702.png "title=" 1467693446.png "alt=" Wkiom1d7oetds4mhaaav8u1xagi702.png "/>This article is from the "Soul Bucket" blog, please be sure to keep this source http://99048702
Prompt "Unable to load file PS1 when running PowerShell directly because scripting is forbidden in this system." For more information, see "Get-help about_signing".Mainly because there is no permission to execute the script.Run Get-help about_signing tips to understand execution policy inputGet-executionpolicyShow RestrictedThe execution of any script is not allowed.by commandGet-help Set-executionpolicy has the following execution strategy:Then modif
Linux environment variables PS1 set linux environment variables PS1 in simple words is to set the command prompt to display the content, as follows: www.2cto.com 1root@10.1.1.200 :~ # The meaning of the prompt in the PS1 variable: \ d: represents the date in the format of weekday month date, for example, Wed Dec 12 \ H: complete host name. For example, the hostna
Linux host name color settings, ps1 settings, but linux has a color RedHat font and background color change method: Command: PS1 quot; [\ e [32; 1 M \ u @ \ h \ W] \\$ quot; or exportPS1 quot; [\ e [32; 1 M \ u @ \ h \ W] \\\ quot; for details about the differences between the two, see the description of environment variables: \ e [32; 1... linux host name color settings,
In Linux the end of the input command, because all are black white paper, always do not know that line is the command of their own input, which is the result of the command.In the Internet search, the original to modify the/ETC/BASHRC global configuration file or the ~/.BASHRC file.1.ps1to modify the Linux terminal command line color, we need to use the PS1,PS1 is an environment variable for Linux end users
First, the experimental environment:installed a Red Hat Enterprise Linux 6.0 can run the system and is a successful verification system. There is another unprivileged user student, password student account exists. Second, the experimental requirements:1 , using alias Create aliases2 , using PS1 Modify Bash the prompt3 , write a simple Shell Small ProgramThird, the experimental steps:Create aliases C:[[Email protected]~]$ alias c= ' Clear ' [[email pro
Linux host name color settings, ps1 settings, but linux has a color RedHat font and background color change method: Command: PS1 = "[\ e [32; 1 m \ u @ \ h \ W] \ $ "or export PS1 =" [\ e [32; 1 m \ u @ \ h \ W] \ $ "for the differences between the two, please refer to the Environment Variable related information explanation: \ e [32; 1 m: this is the escape char
Bash PS1 in LinuxChatting with a friend, he said he had such a confusion when using Ubuntu: using the cd command in bash, after entering some deep directories, or after directories with very long names, the bash command prompt is so long that every command will wrap
Hadoop-mapred @ hdp32:/etc/opt/directorynameisfuckingsolong/my/name/is/spazzzz $This is similar to the above situation... this is the problem with the bash command prompt variable
Many people in the use of Linux, the prompt is not too much attention, can use a good prompt can be more intuitive to see, for their own judgmentLinux has PS1 PS2 PS3 PS4 Four class prompt, these four variables are environment variables, as to what environment variables in the system, you can use the command "env" to viewPS1 Command PromptPS1 has those configuration, or PS1, that can be configured with a co
We all know that in bash, you can change the color of the prompt by PS1 variables. When the command output is long, it is often not easy to see where the output begins at the first glance, change the PS1 variable by changing it, you can change the color of the bash prompt so that you can look at the crowd and find where the output begins. Also, setting colors can make the command line more beautifulWe can c
The. ps1 file is a script file written by PowerShell. In Windows systems, it is not allowed to execute. ps1 files by default, so how can you allow the system to execute. ps1 files?What is the. ps1 file?This is the script text that PowerShell writes, you can write a PowerShell code in Notepad, then save it as "Xxx.ps1",
characters
Therefore, you can specify your preferred command prompt format based on these settings:
PS1 = "/u @/h:/W/$"However, the prompt displayed after this setting has no color. If you want to add a color setting, you can do this:
PS1 = "/E [1; 32 m/u/E [m/E [1; 33m @/E [m/E [1; 35 m/h/E [M: /W/$"At this point, the display in the terminal should be a color prompt, where/E [1; xxm and/E [m is the part t
PS1 scripts are all executed and can be executed directly through Windows PowerShell, but what if we want to execute a PS1 script on a regular basis? We can implement this requirement by: System planning task, the implementation method is shown below
Open: Computer Management, right-click: Task Scheduler, new Basic task,
650) this.width=650; "width=" 639 "height=" 271 "title=" image "style=" b
Linux terminal command line prompt art-PS1 advanced words not to mention, first glance at my command line prompt (a little big): the command line in the figure explains: calendar [calendar date/lunar Date and Time] Calendar [number of directories under the current directory + number of items below the current directory] [current absolute Directory] Calendar [user name @ host name-number of terminals] related configuration file global configuration fil
Linux under PS1 command prompt settingsAdded on the last line of this file: Vim/etc/profileexport ps1= ' [\[email protected]\h \w]\$ ' #这里必须用单引号.\d: Represents the date, in the format weekday month date, for example: "Mon 1" \h: Full host name. For example: My machine name is: Fc4.linux, then this name is Fc4.linux\h: Host name\ t: Display time in 24-hour format, such as: HH:MM:SS \ t: Display time in 12-ho
I. Introduction of PS1PS1 the environment variable used to set the command prompt.The default PS1 content is:[\[email protected]\h \w]\$The default prompt is:[[email protected] ~]#[username @ hostname Path]# (#表示root, $ = Normal user)Second, set PS1Open:vim ~/.BASHRCAdded:ps1= ' [\e[31m\]\[email protected]\[\e[36m\]\h \w]\$\[\e[m\] 'Execution:source ~/.BASHRC\d: Represents the date, formatted as weekday month date, for example: "Mon-1"\h: The full hos
Real columns:My PS1 settings: (Each color change must add \] to end, otherwise it will appear the input long command does not wrap)Ps1= "[\[\e[1;31m\]\u\[\e[0m\]\[\e[1;33m\]@\h\[\e[0m\]\[\e[1;32m\] \w\[\e[0m\]] \\$"650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/6D/wKioL1VJjIHDi6SdAAIb4lirmm8333.jpg "title=" Secai.png "alt=" Wkiol1vjjihdi6sdaaib4lirmm8333.jpg "/>Set Format:Open \[\e[f; Bm\], c
Reference
Ubuntu Initial bash prompt color is the same as the program output color, when a large number of output, it is often difficult to find out where the output information began. If you turn the color of the prompt into a more eye-catching color, it's easy to locate the output information at the beginning.When you want to change the prompt color in bash, you can set it by the value of the PS1 variable, and if you put it in the. bashrc file in
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.