Study Guide
The method is to use your hands and brain more, and compare it with Windows frequently when learning. It is recommended that you install RedHat Linux first, and then practice how to configure it, how to use Linux commands, how to operate under X-WINDOWS, how to install application software under Linux, how to surf the Internet, edit documents, play multimedia files, play games, etc.
There is only one way to get started quickly, that is, do more hands-on operations to see if you can complete the above work.
2. What are the similarities and differences between Linux and Windows?
Windows is a graphical interface. Linux is similar to the previous DOS and has a text interface. If you run the graphical interface program X-WINDOWS, Linux can also display the graphical interface, including the start menu, desktop, icon, etc.
Windows has MS-DOS mode, in which the computer is operated by entering DOS commands; Linux is similar to Windows, and also has command methods. If X-WINDOWS is not executed after Linux is started, it will be in command mode and must issue commands to operate the computer. In addition, there are many application software on Linux. After installing and running these software, you can edit documents and pictures on Linux, play games, surf the Internet, play multimedia files, etc.
However, the partition format and directory structure of Linux are very different from Windows, and the installation methods of application software are also different.
3. Things to note when installing Linux
Before installation, determine which partition Linux is installed on. Linux also has two partitions: system partition and Swap partition (similar to Windows' virtual partition, that is, swap files). Since the partition format supported by Linux is different from that of Windows, if Windows can continue to use it after Linux is installed, Linux should be installed on the last extended partition of the hard disk partition; secondly, the Swap partition of Linux must be guaranteed to be 60MB, and the system partition must be at least 240MB; in addition, collect information about PC hardware, especially display information before installation, which will directly determine the effect of using the graphical interface program after installing Linux; please pay attention to upper and lower case when entering commands during installation and use.
4. Master the directory structure of Linux
The directory structure of Linux is different from that of Windows, and you cannot see the directory under Windows. Conversely, Linux cannot see the directory under Windows. The meaning of each directory under Linux is as follows:
Directory name Meaning
/vmlinuz This directory stores the system kernel
/bin This directory stores common Linux commands, and in some versions, there are some directories that are the same as those under the root directory.
/boot This directory stores programs to be used when the system starts. When using lilo to boot Linux, some information here will be used.
/dev This directory contains all the external devices used in Linux systems. It is actually the port to access these external devices. You can access these external devices, which is no different from accessing a file or a directory. For example, type "cd /dev/cdrom" in the system to see the files in the optical drive; type "cd /dev/mouse" to see the related files of the mouse.
/cdrom This directory is empty when the system is just installed. You can hang the optical drive file system in this directory, such as "mount /dev/cdrom /cdrom"
/etc
This directory stores various configuration files and subdirectories to be used during system management, such as network configuration files, file systems, X system configuration files, device configuration information, setting user information, etc.
/sbin This directory is used to store the system administrator's system administrator's system administrator.
/home If you create a user named "xx", then there is a corresponding "/home/xx" path in the /home directory to store the user's home directory.
/lib This directory is used to store the system dynamic connection shared library. Almost all applications will use the shared library in this directory.
/lost+found This directory is empty in most cases. But when the power outage suddenly or the power is off abnormally, some files are temporarily stored here.
/mnt This directory is also empty in general, and you can temporarily hang other file systems in this directory.
/proc You can obtain system information in this directory, which is generated by the system itself in memory.
/root If you are logged in as a super user, this is the super user's home directory
/tmp is used to store temporary files generated when different programs are executed
/usr Many of the users' applications and files are stored in this directory
5. Common Linux commands
If you encounter a command that you cannot use in Linux command line mode, you can call "man [command]" to get the help of the command. If you want to know what parameters a command has, you can call command -help to get it.
Note: The parameter input form in Linux is different from that in Dos. You should type a space after the command, then type "-", and finally follow one or more parameters; in addition, there is a difference in case under Linux!
The following are several of the most commonly used commands in Linux. Each command is compared with the corresponding dos command and lists some commonly used parameters.
Command Parameters Meaning
Ls
-a lists the hidden files in the system. The hidden files under linux are represented by the file name format. Unlike dos, it is represented by the file attributes, that is, as long as the file starts with ".", it is an implicit file.
-l is listed in a long form. It is to list all the information in the file or directory, and a file occupies one line.
Equivalent to the dir command under dos, it is a command that lists the file list.
cd Like cd under dos, the command to convert the directory. Note: When you go to the upper directory under Linux, you need to type "cd .." instead of "cd .." under dos, that is, there should be a space after "cd"
pwd Lists the current directory command, which is equivalent to the cd command without parameters under dos. For example:
[root@ttqq bin]# pwd /usr/bin [root@ttqq bin]# This means that it is currently in the "/usr/bin" directory.
Mkdir
-m mode represents the default directory mode when creating a directory. This is a feature that dos and Windows do not have, and it is mainly about permissions.
Create a new directory, which is equivalent to the md command of dos. Usually, use mkdir [dirname]
rmdir deletes the directory, which is equivalent to the rd command of dos.
Usage: rmdir [dirname]
cat appends a file after the file, or prints the file content on the screen. The append function is equivalent to dos' copy file1+file2. Printing the file content on the screen can be compared with dos' typeml. If the file is too large and cannot be fully displayed on one screen, the more command can be used.
more The file content is displayed on the split screen, which is roughly the same as the more command under dos, but it can be used with other commands. For example: cat /home/eec/myfile | more.
cp
-r is equivalent to dos' xcopy/s. Used to copy all subdirectories and files in a directory. Copy files is equivalent to copy under dos, and the usage method is the same as copy under dos.