Linux file system is a hierarchical tree-like directory structure, using the "/" root directory of the way
Directory structure:/root directory
|---Root: Store files related to the root user
|---Home: documents related to ordinary users
|---Bin: Store general commands
|---sbin: commands that have certain permissions to use
|---mnt: default mount directory for CD-ROM and floppy drive
|---etc: Store configuration file
|---var: store frequently changing files
|---Boot: store files related to boot system
|---usr: the default directory for installing software programs
Command: Show current directory: PWD
Add user command: Useradd user name
Set Password: passwd user name
Delete User: Userdel user name Explanation: Delete User does not delete user directory
Userdel-r User name Explanation: Delete User and user home directory
Linux operating level: 0: Shutdown
1: Single User
2: Multi-user status No NETWORK service
3: Network Service with multi-user status
4: System not used reserved to user
5: Graphical interface
6: System restart
The commonly used RunLevel is: 3,5 To modify the run level to modify /etc/inittab Id:5initdefault this line
modifies the method of misconfiguration: When the program starts booting for a few seconds: press the E key, Highlight the second line in the input e, the last input: space 1 and then press the B key
The above method can retrieve the lost password, hehe, the principle is to use single-user mode login, and then change the password can not call you to enter the old password
---- --------------------------------------------Linux 3
to display catalog files: LS
Show hidden files: Ls-a
Show list format file: ls-l
Create directory: mkdir
Delete empty directory: RmDir
Linux Many commands we're halfway through Google.
Create empty file: Touch
Copy command: CP
Recursive copy command: Cp-r dir1 dir2
Move or change file name: MV
Delete files and directories: RM
Delete all content (including directories and files) r recursion F Force
To establish symbolic connection: ln
Delete file command: RM
Source target: ln-s
Inittab pointing to the actual file/etc/inittab
Display the contents of the file with pagination: More
Show directory with pagination: less
Query content in text: grep such as: grep [-n] Find letters Find file name -n is optional, display line number
Friendly tip: There are problems in the Linux world to find men: Man command equivalent DOS help such as: Man command
Pipeline command: In Linux and Unix, "|" is the pipe command (handing the result of the previous command to the command processing)
Find command: Find such as: Find/-name Chen G.java means: Look for a file named Cheng.java in the root directory
Pipe-directed command: > such as: grep [-n] to find the letter find the file name > myfile.ba K A ">" number is overwrite write
& nbsp grep [-n] to find the letter find the filename >> myfile.bak Two ">" No. Append write
user Group, permissions
Case:
Create a group command: Groupadd policeman
View linux All Group Info command: Cat/etc/group | more Page display with pipeline commands
Create a user and assign the user to that group useradd-g group name
View all user information in Linux cat/etc/passwd
Use root to modify user Group command: USERMOD-G Group name User name
File Permission Description:
such as:-rw-r--r--
Splitting the above string:
-: File type
rw-: The owner of a file has permission to the file
r--: The file owner's group has permissions to the file
&N Bsp r--: Permissions for users of other users or other groups
permissions are divided into 3 types: R readable 4 for
 W writable 2 means
 X executable 1 means
Modify User Rights command: chmod 770 Username This modifies the user's file access permissions
- Share files on Linux with other computers, you need to build FTP server (VSFTP) on Linux
- Start the FTP server using command on Linux: Service vsftpd start
- Verify that the Linux vsftp is started using the command: FTP localhost
- View the IP address use command in Linux: ifconfig
- Configure IP address for IP linux:
(1). If you find that eth0 has the following error when Linux is enabled:
This is the Redhat Linux 9.0 bug, you need to do this to solve the problem:
See more: http://www.cnblogs.com/eoiioe/archive/2008/09/15/1291247.html
- Above all normal, you can ping Linux IP address on windows, if Ping does not pass Ken can because of the Linux firewall in mischief
(1). Shut down the Linux Firewall service iptables stop
7. View Linux vsftpd.conf configuration file: cd etc/vsftpd/vsftpd.conf profile path
8. Login to Linux FTP on window. User name: Anonymous password: no return
9. Find the previous step is successful, then use the Window FTP tool to connect the Linux FTP default is to connect the Var/ftp/put directory in Linux
10. After the connection is successful, you can upload the file, but the Community upload permission
(1) allow root user to upload method: Remove root user from Vsftpd.user_list
Delete the root user in Vsftpd.ftpusers the two files are said: The following users prohibit the upload operation, two files are under etc. Then restart the vsftp command: service vsftpd Restart so that it can be uploaded. Ok
11. Machine started, vsftpd start configuration method: Chkconfig–list | grep VSFTPD uses this pipeline command to view the end use:
Chkconfig vsftpd on
12. Using remote management of a remote Linux system,
1. Linux-enabled SSHD service: Service sshd start
Install JDK under Linux
(1) First download the JDK installation package under Linux Jdk-6u15-linux-i586-rpm.bin
(2) then upload to the directory under the Linux pub.
(3) then directly installed (directly run the file, according to the prompt installation)
Install Tomcat under Linux
(1) First to compress the Tomcat file package we downloaded such as: apache-tomcat-6.0.20.tar.gz
(2) Add compression command: Gzip–d apache-tomcat-6.0.20.tar.gz Enter
(3) A file will appear in your directory at this time, such as: Apache-tomcat-6.0.20.tar
(4) By then two layers of compression so in use command: TAR–XVF Apache-tomcat-6.0.20.tar decompression
(5) apache-tomcat-6.0.20 directory can be moved to any directory, such as the root directory: MV Apache-tomcat-6.0.20.tar/Enter
(6) The apache-tomcat-6.0.20 directory can be renamed as: MV apache-tomcat-6.0.20 tomcat6.0.20 Enter
15. Under Linux, specify the environment variable command:
(1) Set java_home: Direct input command: java_home= your JDB installation path
such as: Java_home=/urs/java/jdk1.6.0_15 set up after the command to run: Export Java_hom import this Java_home
(2) Viewing the Tomcat process: Ps-ef | grep Tomcat
(3) Permanently shut down the firewall: chkconfig iptables off
(4) There are 2 ways to close the Tomcat method:: Kill Tomcat Process number
(5) RPM explanation: Red had Page Manager
(6) Uninstalling the installation files using the Rpm–e command is similar to adding and removing programs in Windows
For example, use the command to uninstall Jdk:rpm–e Jdk-1.6.0_15-fcs
(7) command line Internet: wget http://localhost:8080/
(8) Setting Global Environment variables: Add environment variable settings in the Etc/profile file
Command: Vi/ect/profile
Added: java_home=/usr/java/jdk1.6.0_15
Export Java_home
(9) Boot automatically starts Tomcat:
Edit etc The following rc.local file
such as: vi/etc/rc.local
Then add the following: Java_home=/usr/java/jdk1.6.0_15
Export Java_home
/tomcat6.0.20/bin/startup.sh
16. Install MySQL under Linux
(1) First download MySQL on the client and server side of Linux
MYSQL-SERVER-4.0.23A-1.9.I386.RPM, mysql-client-4.0.23a-1.9.i386.rpm
(2) then upload to the linux/var/ftp/pub/directory
(3) Installation use command: RPM–IVH mysql-server-4.0.23a-1.9.i386.rpm Enter
3.1 You will encounter errors at this time: error:failed dependencies:
Perl (DBI) is needed by mysql-server-4.0.23a-1.9
The error is that installing this file depends on another package. This package is: perl-dbi-1.32-5.i386.rpm
This file is on the second Linux CD and needs to be copied.
Hanging in Optical drive command: Mount/dev/cdrom/mnt/cdrom
Enter Optical drive command: CD Mnt/cdrom
Copy File command: CP perl-dbi-1.32-5.i386.rpm/var/ftp/pub
(4) Then first install the perl-dbi-1.32-5.i386.rpm file: Rpm–ivh perl-dbi-1.32-5.i386.rpm Enter
(5) Next install the mysql-server-4.0.23a-1.9.i386.rpm file: Rpm–ivh mysql-server-4.0.23a-1.9.i386.rpm Enter
Installation Complete
Verify that MySQL starts the command: PS–EF | grep MySQL
Verify that the MySQL package is loaded with the command: RPM–QA | grep MySQL
Then enter: MySQL return to come in, haha
Linux Boot auto-start Mysql:chkconfig–list | grep MySQL
Linux Learning Notes Summary