A beginner must read the basic Linux knowledge-general Linux technology-Linux technology and application information. The following is a detailed description. 1. Linux File System
Unix File System Management is extremely characteristic. File systems such as NFS, UFS, TMPFS, VFS, and PROC all have different roles. Unix manages character devices and Block devices such as hard disks and printers in the form of files. Operations on these devices are like accessing a file.
2. What is shell?
Shell is the character interface for human-computer interaction. Unix provides a variety of shells for users to choose from, such as bash, tcsh, and ksh in RedHat, which are compiled by different authors. In these shells, you can enter commands to complete system management, configuration, and other tasks. In Solaris, there are sh and csh tasks.
3. login between Linux users and users
Linux is a real multi-user operating system. To use the system, you must enter the user name and password. After the system verification is correct, you can log on to the system.
There are two types of users in Linux:
1) root User: The Super Authorizer and the system owner. In Linux, there is only one root user, which can perform any operation in the system. The password set during system installation is the password of the root user. Keep this password in mind and modify it regularly for security reasons. The confidentiality of passwords must also be ensured.
2) common users: In a Linux system, many common users can be created, and corresponding permissions can be assigned to them so that they can only use the Linux system, such as the mysql users to be created when installing msyql. After you log on remotely through Xwindow or Telnet on the local machine, run the exit command to log out.
4. Change the password
To better protect the security of your account, Linux allows you to use the passwd command to change your password at any time after logon. Three steps are required to change the password:
Enter the original password. If the password is incorrect, the program will be suspended and the password cannot be modified;
Enter a new password;
Enter a new password again. If the two passwords match, the password is modified successfully.
5. User Environment Variables
Environment Variables define the command path, library path, alias, Character Set, and so on required for Executing command operations. /Etc/profile is the default environment variable file for all bash users. The. bash_profile and. bashrc files in the user's home directory are environment variable files defined by bash users. For example, if the ifconfig command is in the/sbin directory and the/sbin PATH is not added to the environment variable PATH, you must enter/sbin/ifconfig for each command execution.
Different shell environment variables are defined in different ways. Bash takes the value assignment method, and then export takes effect.
Run the env command to view all environment variables used by the current user.
6. Linux file and directory permissions
In Linux, each file and directory has the corresponding access permission, which can be divided into three types: readable, writable, and executable, which are represented by r, w, and x, respectively, it indicates read, write, and execute (the executable directory can enter the directory ). Each file or directory has three groups of access permissions. Each group is represented by three digits, for example, d rwx r-x r --.
Part 1: "d" indicates the directory. Others: "-" indicates a common file, and "c" indicates a character device file;
Part 2: Permission words of the file owner;
Part 3: Permission words of users in the same group as the file owner;
Part 4: permissions of other users.
1) command for setting file/directory permissions: chmod [mode] File Name
If you want to set the file a.txt permission to rw-r --, convert it to the binary number 110 110 100, and then convert each three digits to a decimal number to 664. Therefore, run the following command:
Chmod 664 a.txt
The owner of the.txt file is readable and writable to users in the same group. Other users are only readable.
2) Change the owner command of the file/directory: chown [Option] User name: group name file/directory name
The most common option is "R". With this parameter, you can change the owner of all subdirectories and files in the entire directory to a specified user.
7. Linux Daemon
Daemon da. Such as xinetd. The main daemon is in the/etc/xinetd. d directory, while/etc/init. d is the process to be loaded during system initialization, such as syslogd and sendmail.
For example, when we telnet a Linux host, xinetd listens to port 23. when a connection request is found, xinetd starts the telnetd daemon to process the telnet connection.
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