Linux Learning guide _unix linux

Source: Internet
Author: User
Tags file copy mkdir parent directory

Learning Guide Articles

The method is to do more hands, brain, learn to often compare with Windows. 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 the X-windows, how to install the application software under Linux, how to access the Internet under Linux, edit documents, play multimedia files, play games and so on.

There is only one way to get started, and that is to do a lot of hands-on work and see if you can do it.

2. What are the similarities and differences between Linux and Windows?

Windows is a graphical interface, Linux similar to the previous DOS, is a text interface, if you run the Graphics interface program X-windows, Linux can also display a graphical interface, there are Start menu, desktop, icons and so on.

Windows has MS-DOS, in which the computer is operated by entering a DOS command, and Linux is similar to WINDOWS, and there are commands that Linux, if not executed after X-windows, will be in the command mode and must be ordered to operate the computer. In addition Linux also has a lot of application software, installation run these software, you can edit the documents on Linux, pictures, play games, Internet, play multimedia files and so on.

However, the Linux partition format and directory structure, unlike Windows, the application installation methods are different.

3, installation of Linux considerations

Before installation, determine which partition the Linux is installed on, and Linux also has system partitions and swap partitions (Windows-like virtual partitions, or swap files) two partitions. Because Linux supports a different partition format than Windows partition format, if you install Linux, Windows can continue to use, Linux should be installed on the hard disk partition of the last extended partition, and then Linux's swap partition must be guaranteed 60MB, System partitions to ensure that at least 240MB, in addition to gather good PC hardware before installation information, especially display information, which will directly determine your installation of Linux, the use of graphical interface program effect; Please note the case when you enter a command in the installation and use.

4, master the directory structure of Linux

Linux has a different directory structure than Windows and does not see Linux directories under Windows, and in turn, Linux does not see directories under Windows. The meaning of each directory under Linux is as follows:

    directory name   meaning
/vmlinuz This directory is the system kernel  
/bin  common commands for storing Linux in this directory. In some versions it is the same directory as the root directory.  
/boot  This directory contains all the programs that are used when the system starts up, and when you boot Linux with Lilo, some of the information used here  
/dev  The directory includes all the external devices used in the Linux system , it is actually accessing the ports of these external devices, and you can access these external devices without distinction between accessing a file or a directory. For example, in the system type "Cd/dev/cdrom", you can see the files in the CD drive, type "Cd/dev/mouse" to see the mouse related files.  
/cdrom  This directory is empty when you just installed the system, you can hang the optical drive file system in this directory, such as "Mount/dev/cdrom/cdrom"  
/etc
  This directory holds the various configuration files and subdirectories to be used in system administration, such as network configuration file, file system, x system configuration file, device configuration information, setting user information, etc.  
/sbin This directory is used to store system administrator's system management programs.  
/home If you create a user named "XX", there is a corresponding "/home/xx" path in the/home directory that holds the user's home directory.  
/lib  This directory is used to store system dynamic connection shared libraries, and almost all applications use shared libraries  
/lost+found  The directory is empty in most cases. But some files are temporarily stored here when there is a sudden blackout, or when the shutdown is abnormal.
/mnt  The directory is also empty in general, you can temporarily hang another file system in that directory.
/proc  can obtain system information in this directory, which is generated by the system itself in memory  
/root If you are logged in as Superuser, this is the home directory of the Super User
/tmp A temporary file that is used to hold the execution of different programs
/USR users have many applications and files stored in this directory

5, the common command of Linux

If you encounter a command that is not used in Linux command line mode, you can get help with the command by playing "man [command]", and if you want to know what parameters a command has, you can hit command-help to get it.

Note: In Linux, the parameter input form and DOS are not the same, after the command should play a space, and then hit "-", and finally with one or more parameters, and Linux under the case is different!

Here are some of the most commonly used commands under Linux, each of which is compared to the corresponding DOS commands and lists some of the commonly used parameters.

Command parameter meaning
Ls
-a lists the hidden files in the system, and the hidden files under Linux are represented by the format of the file name, unlike DOS, which is represented by file attributes, that is, as long as the file is "." Begins, then it is an implied file.
-L is a long list. is to list all the information for the file or directory, one file for a row
Equivalent to Dos under the dir command, is the column file List command.
CD and DOS CD-like, convert directory commands. Note: Linux to go to the parent directory to play "CD ..." Instead of a Dos "CD ...", a space after "CD"
PWD lists the current directory command, which is equivalent to a CD command with no parameters in DOS. For example:
[Root@ttqq bin]# Pwd/usr/bin [root@ttqq bin]# This means that it is currently under the "/usr/bin" directory.)
Mkdir
-M mode represents the default directory mode when creating a directory. This is DOS and Windows does not have the function, mainly about the issue of permissions.
Create a new directory that corresponds to the DOS MD command. Generally used mkdir [dirname]
RmDir deletes the directory, equivalent to the DOS Rd command.
Usage: rmdir [dirname]
Cat appends files to the file, or prints the contents of the file on the screen, adding functionality equivalent to the copy file1+file2 of DOS, while printing the contents of the file on the screen can be analogous to the DOS typeml. If the file is too large to be fully displayed on one screen, you can use the more command
More split-screen display file content, and DOS under the more similar command, but it can be used with other commands. such as: Cat/home/eec/myfile | More
Cp

-R corresponds to Dos xcopy/s. Used to copy all subdirectories and file copy files in a directory, equivalent to DOS copy, using the same method as under DOS copy.

Related Article

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.