The first day of Linux system learning

Source: Internet
Author: User

The birth of Unix, 1970-1-1


Kernel function: User input command--------> kernel-------> Hardware


Linux composition = kernel + application


Linux distributions (cont. 1)
The name/version of the release is determined by the issuer
–red Hat Enterprise Linux 5/6/7 RHEL
–suse Linux Enterprise 12
–debian Linux 7.8
–ubuntu Linux 14.10/15.04


#################################################

Traditional MBR Partitioning mode
–1~4 a primary partition
–0~3 Primary partition + one extended partition (n logical partitions)


Precautions
–MBR partition table can only record 4 primary partitions, number range 1-4
– When it is necessary to use more than 4 partitions, you need to set up an extended partition (
Primary partition number), the extended partition can have up to 1
– Extended partition as a container of intermediate properties, from which it is again divided
The partition space is a logical partition


File System (Decoration)
Data in space, stored rules, arranged in a way


Typical file system types
–EXT4, fourth generation extended file system, RHEL6 series default
–XFS, advanced log file system, RHEL7 series default
–swap, swap space (virtual memory)

Directory structure

/root directory (computer): Store all data (starting point of Linux system)
/dev: Device files



How disk is represented

HD, indicating IDE device
SD, indicating SCSI device

/dev/sda1/dev/sdb2/dev/sdc3/dev/sdd4
/dev/hda




/DEV/SDA5: First logical partition

#######################################################

Ctrl+alt: Mouse back to the real machine

#####################################################

/DEV/VDA1 500M store kernel and boot files
/DEV/VDA2 100G Storage System

/dev/vda3 100G Custom Partition

/DEV/VDA4 Extended Partition

/dev/vda5 8G Swap

Access point: When accessing a device resource, you must pass the access point

Coal mine-----------> openings

The access point for Linux is a directory


/dev/vda1/boot 500M store kernel and boot files
/dev/vda2/100g Storage System
/dev/vda3/data 100G Custom Partition

/DEV/VDA4 Extended Partition
/dev/vda5 8G Swap





#####################################################


Initialization process
Confirm License Agreement (1---2--and C--c)


#################################################
RHEL7 Basic Operation

Virtual Console Toggle (Ctrl + Alt + Fn key combination)
Ctrl + Alt + F1
Ctrl + Alt + F2
Ctrl + Alt + F3
Ctrl + Alt + F4
Ctrl + Alt + F5
Ctrl + Alt + F6

–tty1: Graphical Desktop
–TTY2~TTY6: Character Console

####################################################

Pseudo-character terminal

Meaning of the hint identification
–[Current user @ Host name Current Location]

– If the current user is root, the last character is #

– Otherwise, the last character is $


####################################################
Use of BASIC commands




View and switch directories
Pwd-print Working Directory
– Purpose: View your current location

Cd-change Directory
– Purpose: Switch working directory
– Format: CD [Destination folder location]

[root@localhost desktop]# pwd #查看当前所在位置
[root@localhost Desktop]# cd/#切换到/directory
[Root@localhost/]# pwd
[Root@localhost/]# ls #查看当前目录下内容

[[email protected]/]# cd/root #切换到/root Directory
[Email protected] ~]# pwd
[[email protected] ~]# ls


Color:
Black: Text File
Blue: Directory



View System-specific versions
[[Email protected] Desktop]# cat/etc/redhat-release

Cat: Dedicated to viewing text file content
-N: Adding line numbers

Full command format:

Command Word option parameter


[Email protected] Desktop]# uname-r #列出内核版本

[Email protected] Desktop]# cat/proc/meminfo #查看内存

[Email protected] Desktop]# lscpu #查看CPU

CTRL + C: End the currently running instruction

[[Email protected] Desktop]# hostname
[Email protected] Desktop]# hostname a.tedu.cn
[[Email protected] Desktop]# hostname

At the opening of a new terminal, the prompt will change

[[Email protected] Desktop]# ifconfig
[[Email protected] Desktop]# ping 127.0.0.1

[Email protected] Desktop]# ifconfig eth0 192.168.1.168
[Email protected] Desktop]# ifconfig eth0
[[Email protected] Desktop]# ping 192.168.1.168


Ls-list
– Format: ls [options] ... [directory or filename] ...

Common Command Options
–-l: Display in long format, displaying detailed properties of directory contents


######################################################

Shutdown: Poweroff
[Email protected] ~]# Poweroff

Restart: reboot
[email protected] ~]# reboot


#####################################################
Common tips:
1. Command not Found!
BASH:CAA: Command not found ...
Bash:caa:command not found ...

Reason:
1. Incorrect command input
2. The command is not installed


[Email protected] Desktop]# lang=en #修改为英文
[[Email protected] Desktop]# LANG=ZH_CN. UTF-8 #修改为中文

###################################################

The first day of Linux system learning

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.