Shell learning in Linux: A shell script file that is automatically executed after a user logs in, configured in. bashrc.
/etc/profile files are configuration system environment variables, such as Jdk,tomcat, and/home/zebra (user name)/.bash_profile file is the environment for configuring users
variables, and. BASHRC is configured to boot, root and ordinary users have this file,/HOME/ZEBRA/.BASHRC, the function is to specify some programs to automatically start when users log on, or when switching to zebra users, the software configured in BASHRC start , such as Tomcat, to add Tomcat-initiated start to the BASHRC file. Note the difference between User Configuration and system configuration, user Configuration is the intuitive effect when switching.
When you want to temporarily join a path, you can use Export path= $PATH: $HOME/BIN:/ROOT/TEST/T1 Output environment variable path references the original value $path $HOME
Represents the home directory: is the path delimiter, the past is to modify the path in the/etc/profile file, which is permanent, display the variable content: Echo $PATH. Specific operation examples:
#export path= $PATH:/root
#env//view is active, ECHO is a specific view of a default path #echo $PATH
The shell's wildcard characters are used: wildcards, * representing multiple letters or numbers;? represents a letter or a number (ls? at?);
#find/home-name my*
#ls fo8o[1-6].txt//Find numbers between 1 and 6
Alias usage: Aliases for Shell commands, such as 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 RunLevel
The Linux system boot process is analyzed as follows:
1,bios self-test;
2. Start the Grub/lilo (enter the boot interface);
3. Run the Linux kernel and stick to the hardware;
4. Init of the first process running the system;
5.init read the information in the system boot configuration file/etc/inittab to initialize;
6./etc/rc.d/rcx.d/[ks]*-based on the RunLevel x Configuration service, terminate the service beginning with "K" and start the service with "S";
7./etc/rc.d/rc.local perform local special configuration;
8. Other special services
Compression and decompression using zip and unzip:
Compressed file: Zip aa.zip file name 2 file name 1; folder compression: Zip-r Aa.zip folder
#zip-M File.zip to.txt//compress to.txt files into file.zip and automatically delete To.txt
#unzip Aa.zip//Decompression
The network programming under Linux, will be specially added later.
Learn Linux notes (iii)