Learn Linux notes (iii)

Source: Internet
Author: User
Tags aliases zip folder

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)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.