In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the linux system command note example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
This article describes linux system commands. Share with you for your reference, the details are as follows:
I. linux system directory
/ bin system command directory
/ dev device directory
/ home every system user has a directory under home
Each user will automatically log in to this directory after logging in to the system.
Root users will be under the / root folder.
/ lib system library directory
/ media multimedia directory
/ mnt mount directory
/ proc system memory directory
/ sbin superuser system command directory
/ tmp system temporary files
/ var the directory of files that change frequently (e.g. database, log)
/ boot system startup file directory
/ etc configuration file directory
/ lost+found lost and found
/ opt directory where the third-party application is located
/ root superuser directory
/ usr system application directory
Second, commonly used shell
1. What is shell?
Shell is the command set.
2.linux command syntax
Prompt > Command name-option argument
3. Common command
Ls views all the files in the directory
-l view file details
-a View all files, including hidden files
Pwd View current work path
Cd switch work path
Clear screen cleaning
Logout logout
Shutdown shutdown
-h minutes. How long will it take to turn off the phone?
-r minutes to restart
-k warning
-c cancel shutdown
Halt, turn it off immediately.
Reboot restarts immediately
* ctrl+alt+F (1-6) to character interface, ctrl+alt+F7 to graphical interface.
III. VI Editor
1. What is VI?
Visual interface visual interface
2. Vi operation mode
1) Command mode
After opening the file, it is in command mode by default, and the file cannot be edited in command mode.
2) input mode
Press I in command mode to enter input mode, which is easy to edit the contents of the file.
3) Last row mode
When you have finished editing, press the ESC key to enter command mode, and then press: enter last line mode
3. Vi command syntax
1) if the vi filename edits the file, it will be created if it does not exist.
2) vi + filename opens the file and locates the last line with the cursor.
3) vi + n filename open the file and position the cursor on line N.
4) vi + / string filename open the file, look for keywords highlighted, press n to jump.
5) vi filename filename edits multiple files to enter the next file: n, enter the previous file: prev
4. Vi shortcut key
I enter the content in front of the cursor and enter input mode
An enter the content after the cursor
Esc enters command mode
Yy copies a row
Dd deletes a row
P paste
: enter the last line mode
The numeric cursor is positioned to the specified line
W save
Q exit
: X save and exit
: set nu displays the line number
: set nonu cancels line number
: w! Or Q! Force save or force exit
/ keywords find keywords, highlight
5. Install vi software
Rpm: software installation, uninstallation, upgrade and query
-Q query
-an all software packages
-e Delete
-I installation
-v shows progress
-h is shown by the # sign
1) query whether to install vi software
Rpm-qa | grep vi
2) if installed, delete
Rpm-e package name
3) Mount the second CD
Eject eject CD-ROM drive
Mount-t auto / dev/cdrom / mnt/cdrom
Mount cdrom to cdrom under mnt, and if prompted that cdrom does not exist, then mkdir / mnt/cdrom
So you can access the contents of the CD under / mnt/cdrom.
Umount / mnt/cdrom
Unmount cdrom
4) locate the installation package rpm and install
Rpm-I installation package
4. A single user cracked the password
1) when entering the system for reading seconds, press any key to enter the following interface, and then press e.
2) then select the following options and press e to enter the interface below.
3) add a space and single at the end, enter and press b to start.
4) after entering the system, use passwd to change the password
5) finally, restart by reboot
Thank you for reading this article carefully. I hope the article "sample Analysis of linux system Command Notes" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.