+Q unlock Command terminalFour, in the end need to add a bit of knowledge, environment variable path: Environment variables are strings that contain information about the environment of the system and the currently logged-on user, and the shell initializes different environments for different users when it is started, and when the shell is called, it reads commands from both initial files. The/etc/profile contains system variables, which are maintained by the system administrator, and are set by
MAC: Remove the computer name of the terminal default prefix1, open the terminal input sudo vi/etc/bashrc, prompted to enter the password is the computer's password.2. Click I to change the edit mode to insert to modify the document, use the # comment ps1= ' \h:\w \u\$ ' and add ps1= ' \w \$ ' at the same time.#PS1 = ' \h:\w \u\$ '
side, 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
variable, so that the shell's child shell also know that the value of the variable ABC is 123. If export does not add any variable names, it declares all variables.
At the end, we are declared with our custom variables.
How do I set a variable in front of the light, and what if I want to cancel a variable? Just type "unset variable name".
With unset ABC, echo $ABC no longer outputs any content.
" configuration files for system environment variables and personal environment variables "
Checking whether a file or folder path exists is a feature that is often used in programming. PowerShell provides a very handy cmdlet for this requirement, which is test-path! Oh, look at a name, you know how professional it is. Take a look at the basic introduction to it first:
Test-path, check to see if the path exists.
Syntax: Test-path Description: The path here can be: file, folder, HKLM Path, environment variable env: path
Here are some examples to make it easier for us to understand:
Re.next (); intN=re.getint (1); System.out.println ("The natural growth of the serial number is" +N); Simplecon.close (re); Simplecon.close (PS); PreparedStatement PS1=con.preparestatement (SQL1); Ps1.setint (1, N); Blob pic=Con.createblob (); Create a binary type OutputStream out=pic.setbinarystream (1); Returns a stream, flows to the binary repository, and sets the position to the i
Statement will have a bug about SQL injection, so I don't useGeneral use PreparedStatementImport java.sql.Connection;Import java.sql.PreparedStatement;Import Java.sql.ResultSet;Import Com.huawei.utils.DBUtil;public class TestJDBC02 {public static void Testpreparedstatement () throws exception{/*** Preprocessing SQL statements does not present a bug with SQL injection*/Connection Connection = Dbutil.getconnection ();String sql = "SELECT * from Users where username=?";Getting preprocessing objects
option, it installs e17 in the/opt/e17 directory by default.
After a long compilation process, you still need to make a little setup. Create an e17 entry under/usr/share/xsessions to load and modify the/etc/profile file, add the path variable of e17, which is as follows:
Code:
#/Etc/profile: system-wide. profile file for the Bourne shell (sh (1 ))
# And Bourne compatible shells (bash (1), ksh (1), ash (1 ),...).
If ["'id-U'"-eq 0]; then
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/
Article Title: Set the linux path display. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
PS1: prompt settings
PS1 (Number 1 rather than the letter l). The special characters in the variable PS1 in each version of bash may
`0269230402f55c00
fffff800`02692308fff6ea00
fffff800`0269230c02e87805
fffff800`02692310031a4a06
fffff800`0269231403116a05
...
These values are at least four digits after being shifted to the left and encoded with other data. In order to form the Absolute Memory Address for each value we need, we need to shift 4 to the right and add the KiServiceTable address. We want to do this at each entry point of the table and output the symbols associated with the absolute address. To achieve this, we can
1. Close the buzzer.
Edit/etc/bashrc
Setterm-blength 0# Setterm-bfreq 10 # Set the sound frequency.
2. Some of Vim's stuf
Install Vim
1. Uninstall vim-minimal: # Yum remove vim-minimal first.
2. Install: # Yum install Vim
3. Alias settings
The default values are all in/etc/profile. d/*. Sh,
For example, find LL: grep 'Alias ll '/etc/profile. d/*. Sh.
Set: alias LL = 'LS-Al -- color = auto'
4. Language settings
Also under/etc/profile. d/*. Sh,
Search for: grep 'lang '/etc/profile. d/*. Sh
Set f
In Linux bash shell, semicolons in statements are generally used as code block identifiers.
1. A single-line statement generally uses semicolons to distinguish code blocks. For example:
Weblogic @ pmtest:/$ if ["$ PS1"]; then echo test is OK; fiTest is OK
In this script or command line, two semicolons are required for the correct statement. The first Semicolon is the semicolon before then, used to identify the end Of the condition block, and the se
file name information of Ise. Define the configuration file
Although the name of the configuration file has been determined, it is not automatically generated with the powershell installation, but must be created by the user as needed. Their creation process is the same as that of General scripts. For more information about script files, see "powershell getting started (8): functions, scripts, and scopes ". Make sure that the path and file name (including the extension.
Modify the command line path length in linux.
The default path prompt is the complete path, so that a line is too long and may occupy the full width! As shown below:
jack@ubuntu:~/trunk-new/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.10.17/net/netfilter/commercials$
It basically occupies 80% of the terminal width. If you can change it to show only the name of the last folder!
Modification method:
Vim ~ /. Bashrc
Search PS1
When accessing the ps1 file, be sure to check whether the access path contains spaces.
Spaces must be enclosed in single quotes.
PowerShell-command Set-ExecutionPolicy "Bypass" set filepath = '% CD % \ AppDeployment. ps1 'powershell-command " % filepath %" Pause
Incorrect syntax:
Ps c: \> C: \ Documents ents and Settings \ Mingle \ My Documents ents \ PS \ test.
/profile: This file presets several important variables, such as PATH, USER, LOGNAME, MAIL, INPUTRC, HOSTNAME, HISTSIZE, umas, and so on.
/Etc/bashrc: This file mainly defaults umask and ps1. This PS1 is the character in front of the command. For example, in my linux system, PS1 is [root @ localhost ~]. #. Check the PS1
Introduction to PowerShell and Bash, powershellbash
PowerShell is a script running on windows, While Bash is a script running on linux.
What bash can do now can also be done by PowerShell. What makes PowerShell powerful is that it can manage windows servers (especially domain ), currently, open-source PowerShell can also manage Linux and Mac (via PSRP ).
1. powershell Program
2. Create a script, simple Helloworld. ps1
Task automation is based on prog
, run the start Command, as shown below :? Ps c: \ Users \ v-lukez> start notepad-WindowStyle MaximizedPS C: \ Users \ v-lukez>
The above results can maximize the Notepad window. In fact, there are many similar commands, and more parameters mean more precise control.
Ii. Create a script
Task automation is based on program files or executable script files. PowerShell also supports making command lists into script files for execution. The content of the Hello.
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.