In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Start the virtual machine debug network configuration command vi / etc/sysconfig/network-scripts/ifcfg-eth0 nmtui (system diagram
(edit) (file open path) shape modification
Press ESC first and then press: command)
Wq (save modification edit operation exit) (Q (no changes can be directly launched)! Is mandatory)
Systemctl restart network (system control command, control management service program (stop restart))
Ip address show (display host IP address / subnet mask / gateway)
Ip address delete (remove host IP/ subnet mask / gateway)
Net.ifnames=0 biosdevname=0 (modify the name of the network card
1) what is the system command prompt
Description: prompts the user of the management system when to enter commands
[root@oldboy69 ~] #
① ② ③
Composition description:
① logs in to the system user name at this time
② sets host name information
③ displays the path information
(~) in the user's home directory
2) Command syntax description
Syntax specification: command spaces [parameters / demand conditions] space object information (file / directory)
Command demonstration: vi-n / etc/hosts ifcfg-eth0
3) system directory structure windows: C:\ oldboy\ oldboy.txt D:\ oldgirl\ oldgirl.txt absolute path lookup data: start from the root to find data information linux: / oldboy/oldboy.txt / oldgirl/oldgirl.txt relative path lookup data: start from the current path to find data information shutdown-disable the operating system command operation method:
Method 1: enter the command directly to shut down the system
Shutdown-1 minute after shutdown Shutdown scheduled for Wed 2019-11-27 20:58:25 EST, use 'shutdown-c' to cancel. Shut down the system in 20:58:25 seconds, use "shutdown-c" to cancel the shutdown schedule Broadcast message from root@oldboy69 (Wed 2019-11-27 20:57:25 EST): broadcast messages from the root@oldboy69 host (broadcast time 2019-11-27 20:57:25 EST) The system is going down for power-off at Wed 2019-11-27 20:58:25 EST! When will the system be shut down?
Method 2: specify how long it takes to shut down the system
Shutdown-h 5 Shutdown scheduled for Wed 2019-11-27 21:10:47 EST, use 'shutdown-c' to cancel. Broadcast message from (Wed 2019-11-27 21:05:47 EST): The system is going down for power-off at Wed 2019-11-27 21:10:47 EST!
Method 3: shut down the operating system immediately
Shutdown-h 0/now poweroff-close operating system commands (close now) halt-close operating system commands (close now) init 0-close operating system commands (close now)
2) how to restart the operating system
Shutdown-restart operating system command
Method 1: specify how long it takes to restart the system
Shutdown-r (reboot) 5 The system is going down for reboot at Wed 2019-11-27 21:19:48 EST! Method 2: immediately restart the operating system # shutdown-r (reboot) 0/now reboot-restart the operating system (restart immediately) init 63) how to cancel the restart or shutdown plan # shutdown-c-cancel the shutdown plan / cancel the restart plan
1) create directory information
Create directory command: make directory = = mkdir
Command usage: mkdir [parameters] directory information
Command usage practice:
Method 1: create a directory
Mkdir / oldboy method 2: after the directory has been created, there is a prompt showing # mkdir-v / oldgirl to show the details of the command execution process or result information mkdir: created directory'/ oldgirl' method 3: create a multi-level directory # mkdir-p (there is also a function to overwrite pre-existing directories without error)
/ oldboy/oldboy01/oldboy02/oldboy03/oldboy04/oldboy05
Parameter-p parent-when creating a subdirectory, the parent directory (/-> parent directory-> subdirectory) is created first.
System file related commands
1) how to create a file
Create file command: touch (touch) as long as you touch it in the system, a file will be created.
You can generate multiple files touch {1.. 20} .txt file to display 1.txt 2.txt
3.txt 4.txt. 20.txt ls
How to use the command:
Touch / oldboy/oldboy.txt-create an empty file (empty text) 2) how to view a file to view file information: cat (cat) is as curious as a cat = = look at the information in the file command usage: (view file or directory cannot be on the # left ~ home directory Find) # cat / oldboy/oldboy.txt 3) how to edit a text how to edit a file: vi echo "command usage: method 1: vi command editing file three steps: I-- > esc-- >: wq
Method 2: echo command to edit the file
Echo hello world > / oldboy/oldboy.txt-clear the contents of the file before adding new information
Echo oldboy69 > > / oldboy/oldboy.txt-append new information to the original file
How to view the catalog
View directory command: list = = ls
How to use the command: ls to view file or directory information
Command usage practice:
Ls / oldb / oy: directly view the data information in the directory (why did you try not to display the file information last night, here it is not detailed) (completed by Tab Tree command to view directory information) # ls-d / oldboy directly confirm whether the directory exists parameter:-d directory-only view directory information method 3: view directory details # ls-l / oldboy/-view directory details # ls-ld / oldboy/-- longer display details
3) how to use directories
Directory switch command: change directory = = cd
Command usage: cd directory path information
Command usage practice:
Method 1: use absolute path to switch directories
Cd / oldboy/oldboy01/oldboy02/oldboy03/oldboy04/oldboy05
Method 2: use the relative path to switch the directory to the next level: cd oldboy04/oldy05bo switch to the next level directory: cd.. / method 3: how to quickly return to the city or go home cd ~ or cd method 4: quickly switch to the last directory cd-4) how to view the directory information? Check the directory path: print working directory = = pwd command usage: # pwd (you can check whether the current directory is the current directory or the relative path "shows that the root is the absolute path), then you have to look for the file from the root." details the location of the parent directory of the command / oldboy/oldboy01/oldboy02/oldboy03/oldboy04/oldboy05
4) how to back up file replication
Copy operation command: copy = = cp
Command syntax structure: cp [parameter] to copy the source file backup file directory path
How to use the command:
Backup to the same file will have overwrite? (overwrite) prompt to add a directory name empty file name (aa.txt.sss)
Method 1: save backup file information
Cp / oldboy/oldboy.txt / backup/oldboy.txt.bak
Method 2: save the backup directory information cp-r / oldboy/ / backup/ = = Why back up the data? 1) prevent the file from being mistakenly deleted; 2) prevent the file from being mistakenly modified; 3) for file comparison?
5) how to move file / directory clipping
Move operation command: move = = mv
Command syntax format: mv [parameter] to which directory to move the source file
How to use the command:
Method 1: move data information
Mv / oldboy/oldboy.txt / backup Mobile File Information # mv / oldboy/oldgirl / backup/ Mobile Directory Information method 2: rename data (that is, rename empty files) # mv / oldboy/olddog.txt / oldboy/oldbaby.txt5) how to delete directory delete data information: remove = = rm (dangerous) command syntax format: rm [parameter ] data information command usage: method 1: delete directory information rm-rf / oldboy-force recursive deletion of directory parameters description:-r recursion-recursively delete all data in the directory-- f force-- (multiple files can be forcibly deleted together Do not use a y to confirm deletion) = on behalf of all method 2: delete file information rm-rf / oldboy/* method 3: clear directory data rm-f / oldboy/oldgirl*-delete the message that begins with oldgirl rm-f / oldboy/*.jpg-delete the message ending with .jpg first A great lesson: delete root run special instructions: / root directory can be deleted? Cannot be deleted by default. There is an anti-suicide mechanism rm-rf /-- no-preserve-root rm-rf / *.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.