, separated by colons. Within the last field, the default login shell is:root:x:0:0:root:/root:/bin/bash. . .demouser:x:1000:1000:,,,:/home/demouser/bin/bashIf the last field is/bin/bash, the setting is complete.If the last field is not/bin/bash and you want to change the default shell to bash, you can edit the file with root permission and change the last field associated with the user:sudo nano /etc/passwdAfter the change is complete, log out and return to use the bash shell.View current value
Linux terminal prompt features are defined by the system environment variable ps1. Run the ''echo $ PS1 #39; #39; command to view the current settings. PS1 values are composed of a series of static text or
Linux terminal prompt features are defined by the system environment variable ps1. Run the ''echo $
This article describes how to get the directory where the script file (. ps1 file) is located in the PowerShell script. This article describes the method applied to PowerShell 3.0.
In PowerShell 3.0, there is a variable that makes it easy to get the directory where the script resides. We are in E:\ps\script1.ps1 and SCRIPT2.PS1, the contents are as follows:
SCR
Tags: special symbol permanent password time meaning program. BASHRC Direct CentOSWe use the Linux system when the most contact is its command-line window, many times we need to enter commands on the command line, before the input command will have a prompt, the general system default prompt form is:
[[Email protected] working directory
In fact, we can customize the command line prompt for ourselves, the Linux system prompt is defined by the system variable
Introduction to the 1.Linux command-line promptAs we all know, the Linux command line is the system administrator to manage the Linux important means, we manage the Linux, first face is the Linux command line prompt.The prompt at the end of the Linux command line has two different symbols, "#" and "$", as follows: [[ email protected] ~]# # [[email protected] ~]$ #which1) # is a command-line end prompt that uses superuser root login , and the $ number is a command-line end prompt with a normal
to connect to a server, login shell mode is started by default.
In this mode, the shell runs automatically./etc/profileAnd~/.profileFile, but does not execute any bashrc file, so the/etc/profile or ~ /. Profile, we will manually go to the source bashrc file.
In the case of no-Login Shell, we directly input bash or bash-c "cmd" in the terminal to start the shell.
In this mode, no profile files are automatically run.Interactive Shell and non-interactive shell
Interactive Shell is an interactive s
Under Ubuntu, by default, the absolute path is shown for the terminal, for example:650) this.width=650; "title=" Terminal Show full path "style=" Border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" terminal show full Path "src=" http://i2.wp.com/www.crifan.com/files/pic/uploads/2013/08/terminal-show-full-path_thumb.png?resize= 615%2c333 "height=" 333 "width=" 615 "border=" 0 "/>Now you want it to show
Document directory
Task: display current bash prompt (PS1)
Task: modify current bash prompt
Task: add colors to the prompt
Task: how to make the prompt setting permanent
Tput command
Handy tput commands
Colors {code} code for tput command
Q. How do I change the color of my shell prompt under Linux?
A. YouCan change the color of your shell prompt to impress your friend orMake your own life quite easy while working at command prompt.
In the L
Document directory
1. Add a smiley face symbol to the successfully executed command.
6. display the number of running tasks in the background
7. Display path information
8. My prompt
Eight practical and interesting bash command prompt lines
Zhao Yu
Original: http://coolshell.cn /? P = 1399 (cool shell)
Many people are not concerned about the importance of command line prompts. But I do not think so at all. A good command line prompt can change the way you use commands. To this end, I foun
Modify the Linux terminal command line Color
This article turns from: http://www.cnblogs.com/menlsh/archive/2012/08/27/2659101.html
The Linux operating system (Cent5.0) has been used recently because of work needs. I hate the way Linux terminals command the same style, and not easy to distinguish with the output content, it is easy to see eye. So on the Internet to find a way to modify the Linux terminal command line color, the way they have validated, and finally found an effective way to mo
Linux: Ubuntu14.04 garbled characters may occur when a specific symbol is entered ............. display, some display !!!!!!!! Input gt; echo $ PS1: Enter gedit ~ in the personal user folder ~ /. Bashrc modify these lines of code if ["$ color_prompt" = yes]; thenPS
Linux: Ubuntu 14.04
If you enter a specific symbol, Garbled text will be displayed in the Garbled text !!!!!!!!
Picture of the entire operation code process and final display result
Input
element into the non-empty queue in Q1 and Q2, that is, to enter the Q2 queue, if the stack is output, it is the same as above. In addition to the last element of Q2, it will all go to the queue Q1 in sequence, and then the last element of Q2 will go out of the queue.
The implementation code is as follows:
/* Use two queues to simulate the stack operation */void push (PQUEUE pS1, PQUEUE pS2, int val) {if (is_empty (pS2) en_queue (
content (for example, data allocated on the heap), then when copying the object, let the old and new objects point to the same external content, which is a shallow copy. (Although the pointer is copied, but the space content is not copied, but by two objects, two objects are not independent, the deletion of space exists) a shallow copy of the object, only copied the object itselfdeep Copy : If you make an independent copy of an external object for the new object while copying this object, it is
Agg contains a number of vertex sources that we can call directly, and they include:Agg::p Ath_storageAgg::arcAgg::rounded_rectAgg::ellipseAgg::curve3Agg::curve4 ...1) for agg::p ath_storageNow try to view agg::p ath_storage The effect that is passed directly to Scanline rasterizer:Now we're trying to portray a line segment, here's a question not passing through Agg::conv_stroke, howSets the width of the segment, and the default value is notNothing, can not draw the line, it seems still need to
in the non-empty queue, that is, into the Q2 queue, out of the stack, as before, will Q2 except the last element all out of the team, and then into the queue Q1, Then the last element of the Q2 will be out of the team.Implementation code such as the following:/* Simulate a stack operation with two queues */void push (Pqueue ps1,pqueue ps2,int val) {if (Is_empty (pS2)) En_queue (PS1, Val); Elseen_queue (PS2
Http://club.topsage.com/thread-1201128-1-1.html
Many people are not concerned about the importance of command line prompts. But I do not think so at all. A good command line prompt can change the way you use commands. To this end, I found some useful, excellent, and interesting bash command line prompts on the Internet. Below I will list some of my favorite command line prompts as follows.
Note-to use the following prompts, you can copy and paste the headers starting with "
following path.
Description: Router ----------- ---- current user and current host $ Home \ [My] Documents \ WindowsPowerShell \ Profile. currently, ps1 users and all hosts $ Home \ [My] Documents \ Profile. all ps1 users, current host $ PsHome \ Microsoft. powerShell_profile.ps1 all users, all hosts $ PsHome \ Profile. the ps1 preset route entry contains the fo
@ubuntu:~/lssc/chpt1$ var1 =valuevar1: command not foundbuxizhizhou@ubuntu:~/lssc/chpt1$ var1 = valuevar1: command not found3. Set environment variables for export. This variable is inherited from any application executed by the current shell script.
Standard environment variables, such as PATH. After the command to be executed is given, shell will automatically find the corresponding executable file in the directory contained in the path environment variable. (Directory paths are separated by c
Directory
Directory
Description
PS1
Color syntax
Save Settings
DescriptionOn the internet to find a lot of information is not very detailed, or grammatical errors.So it took a long time to understand the whole, write down to facilitate the people behind the study.My Linux virtual machine version may be slightly different from the other versions of CentOS 6.5 ha.PS1PS1 is an environment variable
Some time ago, just came to practice, because their development machine environment has not yet been equipped with the boss of the machine, opened, Yi ~! Why not traditional linux [[email protected]]? This aroused the baby's great curiosity (why the tender?) Do you want to pretend to be old? And, as a result, once again opened the bird Brother's recipe (bird brother's Linux private dishes), but also for the sake of the Niang, finally have the answer. ps1
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.