Linux Basic Knowledge Day-1

Source: Internet
Author: User

Linux System Introduction:

Linux is a free-to-use and free-to-propagate Unix-like operating system, a POSIX and Unix-based multiuser, multitasking, multi-threaded and multi-CPU operating system. Widely used in the operating system on the server, the common graphical desktop has GNOME, KDE two kinds.

"Everything is a file" in a Linux system.

Linux system Installation

1. Select the first item: Install CentOS Linux 7

  

2. Select the language of the installation interface (not the system language after installation). )

  

3. Configure the installation summary information and click Start Installation.

  

4. Configure the root password and wait for the installation to finish entering the system.

  

Linux file system

The Linux file system is a single-root file system and the Windows system is a multi-root file system. The directory path for all files in the Linux file system is the identifier "/" from "root", and the first "/" on the left side of the file path represents the root. Windows has multiple file path roots, for example: C:\Windows, d:\notepad++, and the root of these directories are different.

Absolute path: The path from the root is the absolute path, and the absolute path is valid anywhere in the system.

Relative path: The path to another file from the location of the current directory is a relative path.

Root directory The role of some directories:

/boot The directory is the Linux boot file and kernel that is stored by default.
/bin common commands for Linux in this directory.
/sbin This directory is used to store the hypervisor used by the system administrator.
/var The directory contains files that are frequently modified, including various logs and data files.
/etc The directory contains the various configuration files and subdirectories to be used when managing the system.
/dev The directory contains all the devices used in the Linux system.
/mnt mount the Mobile Media directory.
/root the home directory of the super user.
/home is used to store the user's main directory.
The applications and files of the/USR user are almost always stored in this directory.
/lib This directory is used to store system dynamic link shared libraries, and almost all applications will use shared libraries in that directory.
/OPT third-party software will find this directory by default at the time of installation.
/TMP holds temporary files that are generated when different programs are executed.
/proc can obtain system information in this directory, which is generated in memory by the system itself, and the contents of the directory are not on the hard disk and in memory.

Basic command knowledge:

1. "$" for normal user login prompt

2. "#" Login prompt for root user

3.Linux Terminal also known as Virtual Console, can be switched using ctrl+alt+f[1~6]

4.Linux command format: command [options] [parameters]

Command: Commands to control what the operating system does

Options: Select the function of the command to perform related actions

Parameters: An object that describes the effect (action) of the command (a file, a directory, or a character)

5.Linux Letter Case

6.whoami: Check the current terminal login user

7.who: View the currently logged in user, TTY refers to the physical terminal, PTS refers to the virtual terminal.

    

8.date: View the current system time. Use date-s ' 2017-05-23 16:48:00 ' to configure the system time is May 23, 2017 16:48 0 seconds.

9.cal: View the current system calendar. Use Cal 11 2000 to view the calendar for November 2000.

10.clear: Clear the screen command. You can also use the Ctrl+l shortcut key to clear the screen

11.SU: Switch User command. Su [user name] does not switch completely. Su-[user name] switch completely.

12.PASSWD: Modify the user password, only the root user can modify the other user password. Ordinary users can only change their own passwords.

13.man:man [command name] gets the help manual for the corresponding command. You can also add--help after the command to try to display Help, for example: LS--help

14.PWD: Used to display the location of the currently located directory

15.CD: Switch directories. The equivalent of Windows double-click to open a folder, CD ~ Quickly back home in any location, CD. Return to upper level directory

16.ls: Displays the files in the current directory. The LS default in the system is the parameter "LS--color-auto" that performs the alias.

-A: Displays all files in the current directory that contain hidden files.

-L: Displays the details of all files in the directory without hidden files (view permissions, number of hard links, number of directory files, creation time, etc.)

17.CP: Copy files and directories.

-I: When copying a file to a target location already exists, prompt whether to overwrite

-R: Recursive replication, commonly used to replicate directories

-A: Copy all permissions to files with files (full copy)

18.mkdir: Create a directory. When using the "-P" parameter, the directory can be created recursively. For example: Mkdir-p/a/b/c ..., create a folder under the root directory, create the B folder under the A folder ...

19.touch: Create a blank file.

20.RM: Delete command.

-R: Recursive deletion, often used to delete folders.

-F: Force delete does not ask.

-V: Displays the detailed removal process.

-I: Require confirmation of deletion when deleting files, RM command in system default execution parameter is Rm-i

21.which: The directory location where the query command resides. Example: Which LS

22.useradd: Add a user. For example: Useradd ABC. useradd [user name]. Creating a user without using the-m parameter creates a home directory, and no shell is available when the user logs on.

23.shutdown: Shutdown command. Halt-p can also be turned off.

24.rmdir: Only empty directories can be deleted and directories containing content cannot be deleted.

Linux Basic Knowledge Day-1

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.