linux "prehistoric civilization"

What is
a kind of Linux operating system

Common operating system
PC terminal: Windows, MAC
Mobile terminal: Android, ios, Symbian, WinPhone
Server: UNIX (HP-UX, AIX, Solaris), Linux, Windows Server
Embedded: set-top box, smart speakers and other smart homes (large Most of them are revised Android)

Linux release version
1, Debian series
Ubuntu, Debian
2, Slackware series
Suse (enterprise edition operating system)
Opensuse (open source)
3, Redhat series
Redhat Enterprise Linux, referred to as RHEL
RHEL5 RHEL6 RHEL7 RHEL8
CentOS, based on RHEL source code, except for charged services, And Red Hat LOGO, recompiled and released version
Open source, free
CentOS5 CentOS6 CentOS7 CentOS8
Fedora

Virtualization Technology
Virtual Machine
Simulate a computer through software. The simulated
computer has a complete hardware system,
including: CPU, hard disk, memory, optical drive, USB interface, network...
AMD and Intel chips have their own virtualization technology
. Computer, virtualization technology may not be turned on by default, and
virtualization software needs to be turned on in BIOS

VMware Workstation fee software
Virtual Box Free software
Hyper-V Microsoft comes with
KVM Linux platform

Virtual machine application scenario
1. Experiment or test: Linux learning, Windows server learning
2. Internet cloud platform
Domestic: Alibaba Cloud, Tencent Cloud, Baidu Cloud, Huawei Cloud
Foreign: Amazon, Azure, Google
3. Software testing, reverse analysis, virus analysis

Command basics
The composition of the command prompt:
[root@ops15 ~]#
root: user name
@: indicates the location of ...
ops15: host name
~: current directory: home directory
#: authority prompt, # represents the administrator , $ Stands for ordinary users

su to switch users
Syntax:
su user name to switch users, but not to switch directories
su-user name to switch directories, and switch to the user's home directory

Command composition
command name option parameter
options are divided into long options and short options

Long options are usually
- option name

The short option is usually
-single letter

Get help
1. whatis
2. Help through the command
ls –help
3. Through the help manual
man ls
(press q to exit)
4. Through the info command
info ls
(press q to exit)
5. Online Chinese help document
https://man. linuxde.net/cd

Common commands
echo Print string
date Display time and date
ifconfig View network card information
lscpu View CPU information
lsblk View device information (disks, partitions, CD-ROM drives)
clear Clear screen
su Switch user
exit Log out log in
hostname Modify host name
shutdown -h Shut down
shutdown -r Restart
whoami displays the current user
cal calendar

Directory and file management
Directory management
Linux directory structure

/: root directory, the starting point of all files
/bin: binary, store binary files, all commands used by users are placed here
/sbin: store commands used by administrators
/boot: boot files used for booting
/dev: device , Store device files
/etc: configuration files, usually in text format
/home: home directory of ordinary users
/root: home directory
of root user The role of home directory
1. When the user logs in, the default is to enter his home directory
2. User Have full permissions in your home directory
3. User data is stored in the home directory

/lib: library, library file
/mnt: mount, mount directory
/opt: installation location of third-party applications
/srv: usually store files to be shared
/sys: system, store system-related files
/tmp: temporary, Store temporary files
/usr: user, store the user-level directory
/var: store the variable file directory
/var/log: store the log

Directory management command
pwd: display the absolute path of the current directory
cd: switch directory
/ root directory
~ the current user's home directory
. Current directory
... previous level
-previous directory

Relative path The path from the current directory to the target location
Absolute path The path from the root directory to the target location

Example:
Current path: /usr/local
switch to /usr/bin

ls: List the contents of the directory.
Format
ls [option] [parameter]
ls [parameter] [target/object]

-a display all files in the directory (including hidden files)

-A displays all files in the directory except. And...

-l displays the detailed information of the directory or file
(note: ls -a -l == ls -la == ls -al)

-h and -l are used together to display the size of the file in an easy-to-read way

-R recursively display subdirectories and files of a directory

mkdir: create a directory
mkdir [options] directory name
-v shows the process of
creation -p recursive creation, if the parent directory does not exist, create the parent directory first

rmdir delete empty directories

Guess you like

Origin blog.csdn.net/weixin_51014063/article/details/108731481