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
Tags: Shell current directory interpretation. BASHRC represents the scheme IMA slash TPSDrop one first:How to make your LD terminal more personal? First of all, we need to understand the following points of knowledge.A: Configuration filePersonal configuration file:~/.BASHRCGlobal settings file:/ETC/BASH.BASHRC (Modify requires Administrator privileges)BThe command prompt is controlled by a special shell variable, namely: PS1,PS2,PS3,PS4.We can only c
How to change the Ubuntu terminal user name color to red
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> echo $ PS1
Display: as shown in Figure
Enter in the personal user folder
Enter gedit ~ /. Bashrc
Modify these lines of code
If ["$ color_prompt" = yes]; then
PS1 =
Font color settings on the Linux terminal interface
Directory
DescriptionPS1Color syntaxSave settings
DescriptionI found a lot of information on the Internet, which is not very detailed, or there is a syntax error.So it took a long time to understand it. It was easy to write it down for later people to learn.Other Linux Virtual Machine versions of CentOS 6.5 may be slightly different.
PS1PS1 is an environment variable for Linux end users. It is used to describe the settings of command line promp
The default PS1 quot; [\ u @ \ h \ W] \1 quot; parameter settings of PS1 in fc, where \ W is the path setting option, W in upper case is the description mode, and w in lower case is the full path mode. if you change it, the PS1 quot; [\ u @ \ h \ W] \ $ quot; is OK; you can also: exportPS1 quot; [\ u @ \ h \ 'pwd \ '] $ quot; alia.
I believe many people are tired of reading the color of Linux Command Prompt which has become unchanged. Most people either use the default green or set it to green when using PUTTY, I don't know if someone thinks that the prompt can be set to another color. This article describes how to set the command prompt variable ps1.1. Introduction to PS1 Variables
PS1 is an environment variable for Linux end users.
The cue color in the shell terminal is determined by the PS1 in the environment variable, so change the PS1.1> Temporary changes[[Email protected]~]# echo $PS 1 [\[email protected]\h\w]\$ [email protected]~]# ps1= ' \[\033[31m\][\[email prote cted]\h\w]\[\e[0m\]\\$ "[[Email protected]~]#Use echo $PS 1 to view the value of the PS1 at this time, and then give
money=money+100 where name= ' B ';(2) Set up a transaction rollback pointSavePoint sp = Conn.setsavepoint ();Conn.rollback (SP);Conn.commit (); Must be submitted after rollbackPackage com.itheima.transaction;Import java.sql.Connection;Import Java.sql.DriverManager;Import java.sql.PreparedStatement;Import java.sql.SQLException;Import Java.sql.Savepoint;Import Org.junit.Test;Import Com.itheima.util.DaoUtil;public class Demo1 {@Testpublic void Test1 () {Connection conn = null;PreparedStatement
effect until next login.
5-bash-3.00 # cat/etc/passwd
6 root: x: 0: 0: Super-User: // bin/bash
7...
8...
9 user: x: 100: 1:/home/user:/bin/bash
Next login, we can find that bash is used by default.
By default, the bash shell prompt is:
1. bash-3.00 $
2 bash-3.00 #
It can be "gorgeous" to express the current version of bash and whether it is out of the root, there is no other information, you can refer to this Article "Tips: Magic Tips", it is very detailed.
In the initial stage, first define th
[Cake] 0.C# Make automated building-Overview,0. What is Cake?
Cake, short for C # Make, is an automated building system based on C # DSL. It can be used to compile code, copy files and folders, run unit tests, compress files, and build Nuget packages.
Familiar with the famous Make friends, you should already know what kind of tools Cake is. Cake has the following features:1. A simple DEMO
The author created a simple DEMO (cake. demo) on Github. The following is a brief introduction. The project
Recently, we have been using the Linux operating system (cent5.0) because of our work needs ). I hate Linux terminal command line unchanged style, and it is not easy to distinguish from the output content, it is easy to see. So I went online and found a method to modify the command line color of the Linux terminal. I verified those methods and finally found a valid method to modify the command line color of the Linux terminal. (Take the root user as an example)
1.
tool class is needed to get the same connection link//Get the same connection, referring to the implementation of Hibernate's Getcurrentsessionimport Java.sql.connection;import java.sql.sqlexception;import javax.sql.DataSource; Public classconnectionutil{ Public StaticFinal threadlocalNewThreadlocal(); Public StaticConnection getconnection (DataSource DataSource) throws sqlexception{Connection C= Connections.Get();if(NULL==c) {C=datasource.getconnection (); Connections.set (c);}returnC; }}Sprin
prompt do not say here, want to modify the prompt, only need to modify the shell environment variable "ps1" (if a command needs to enter more than one line, you can set "ps2").For example, the environment variable "ps1" in the shell has been set to:ps1="There is no redundant information, only the "$" tag (the root user is the "#" tag when logged in).At this point, if you want to display the "
Recently Learning Linux operating systems (CentOS 6 CentOS 7). The Linux terminal command line is all white, which often causes the command and output to be difficult to distinguish. So on the Internet to find a way to modify the Linux terminal command line color, found by defining the PS1 environment variable can be implemented, below I as the root user operation.1. Understanding PS1PS1 is an environment variable for Linux end users that defines the
When you open a Shell terminal in a Linux environment, you will see a Bash prompt similar to the following in the command line: [[email protected] $host ~]$ do you know that the command line prompt can actually be set to add many very useful information yourself? In this article I'll show you how to customize your own Bash command-line prompt and see what you want to see.How to set up a Bash promptThe Bash prompt is set through the environment variable PS1
transaction is actually locked.
from the top down, the efficiency is getting lower.
Finally, let's look at some examples:
package com.bjsxt.jdbc;
import java.sql.Connection;
import Java.sql.DriverManager;
import java.sql.PreparedStatement;
import Java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
* Basic concepts and usage of test transactions
* @author Gao www.sxt.cn
*
*/
Public class Demo06 {
Public static void Main (string[] args) {
Connection conn = null;
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.