Study Linux notes (3)
Shell learning in Linux: The shell script file automatically executed after the user logs on to the system, which is configured in. bashrc.
The/etc/profile file is used to configure system environment variables, such as jdk and tomcat, And the/home/zebra (User Name)/. bash_profile file is used to configure the user's environment.
Variable, and. bashrc is configured for boot. Both root and common users have this file,/home/zebra /. bashrc can be used to specify that some programs are automatically started upon user logon. That is, when you switch to the zebra user, the software configured in bashrc starts to start, for example, tomcat, add the start started by tomcat to the bashrc file. Note that the difference between user configuration and system configuration is that the switching validity period is intuitive.
When you want to temporarily Add a PATH, you can use export PATH = $ PATH: $ HOME/bin:/root/test/t1 to output the environment variable PATH to reference the original value $ PATH $ HOME.
Indicates the main directory: it is the PATH separator. In the past, it was the PATH in the/etc/profile file. This is permanent and the variable content is displayed: echo $ PATH. Specific Operation instance:
# Export PATH = $ PATH:/root
# Env // check whether it takes effect. echo is used to view a specific default PATH # echo $ PATH
The shell wildcard uses: wildcard, * represents multiple letters or numbers ;? Represents a letter or number (ls? At ?);
# Find/home-name my *
# Ls fo8o[1-62.16.txt // find the number between 1 and 6
Alias usage: alias for shell commands, for example, alias mysqldump-u root-p123456 zebra>/home/zeb. SQL as mdp;
# Alias mdp = 'mysqldump-u root-p123456 zebra>/home/zeb. SQL'
# Alias // view all shell aliases
Runlevel command to view the current running level
The linux Startup Process is analyzed as follows:
1. BIOS self-check;
2. Start GRUB/LILO (enter the boot Interface );
3. run Linux kernel and stick to hardware;
4. Run the system's first process init;
5. init reads the information in the system boot configuration file/etc/inittab for initialization;
6. /etc/rc. d/rcX. d/[KS] *-configure the Service Based on running level X to terminate the service starting with "K" and start the service starting with "S;
7./etc/rc. d/rc. local: execute local special configuration;
8. Other Special Services
Zip and unzip compression and decompression:
Compressed file: zip aa.zip file name 2 file name 1; zip-r aa.zip folder
# Zip-m file.zip to.txt // compress the to.txt file into a file.zip file and delete the to.txt file automatically.
# Unzip aa.zip // Extract
Network Programming in linux will be added later.