search
HomeOperation and MaintenanceLinux Operation and MaintenanceHow to find keywords in vi in ​​linux

How to find keywords in vi in ​​linux

How to find keywords in vi editing mode in Linux:

1. Enter vi, first press "ESC" to jump to command input mode

2. Enter the slash "/", then the screen will jump to the bottom, and the input field will appear "/"

3. Enter the keyword you need to find, and press Enter

4. If you want to continue searching for keywords, enter n

5. To search forward, enter N (capital)

Recommended learning: linux tutorial

The above is the detailed content of How to find keywords in vi in ​​linux. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to configure network bondingHow to configure network bondingAug 12, 2025 am 06:00 AM

Network binding configuration requires selecting the mode before setting the file. 1. Select mode: mode=0 realizes load balancing, and requires switch cooperation; mode=1 is highly available for main and backup, suitable for single network card work; mode=4 requires LACP support, better performance. 2. Edit configuration files: Create ifcfg-bond0 under /etc/sysconfig/network-scripts/ and set IP and other parameters, and modify each network card file to point to bond0. 3. Loading module restart service: execute modprobebonding to load the module, and then restart the network with systemctlrestartnetwork. 4. Pay attention to the problem: Make sure the switch matches LACP and avoids IP conflicts

How to use systemd timers instead of cronHow to use systemd timers instead of cronAug 12, 2025 am 03:50 AM

Systemdtimersareamodern,morerobustalternativetocronjobsforschedulingtasksonLinux.1.Theyworkusingpaired.timerand.servicefiles,wherethetimerdefineswhentorunandtheservicedefineswhattoexecute.2.Tocreateadailybackuptaskat2AM,youcreateaservicefilespecifyin

How to enter single user modeHow to enter single user modeAug 12, 2025 am 03:02 AM

The way to enter single-user mode varies from system to system: 1. Linux (CentOS/RHEL) starts after editing startup parameters in the GRUB menu and add init=/bin/bash or rd.break; 2. Ubuntu selects the recovery mode kernel to enter the menu interface; 3. After macOS shuts down, press Command S to enter the command line interface; 4. Windows does not have single-user mode but can use safe mode or WinRE command prompt. Each method provides an environment with root permissions for system maintenance.

How to configure Transparent Huge Pages THPHow to configure Transparent Huge Pages THPAug 12, 2025 am 01:40 AM

To configure transparent large pages (THP), first check the current status and use cat/sys/kernel/mm/transparent_hugepage/enabled to view; 1. Temporary adjustments can be made by writing always, madvise or never to the file; 2. Permanent configuration requires modifying GRUB_CMDLINE_LINUX in /etc/default/grub to add transparent_hugepage= parameter and update GRUB; 3. Select mode according to application type: always suitable for general scenarios, madvise is used for delay-sensitive applications, and never is used for memory-intensive services such as MySQL

How to update packages using yumHow to update packages using yumAug 11, 2025 pm 04:21 PM

To use yum to update the software package, first view the updated content, and then choose the update method according to your needs. 1. Check the updated package: execute yumlistupdates to understand the items to be upgraded; 2. Update specific packages: Use yumupdatepackage_name1package_name2 to accurately control the upgrade object, such as yumupdatenginxopenssl; 3. Update all available packages: Run yumupdate and confirm the operation to complete the full upgrade; 4. Optional cleaning of old dependencies: After installing yum-utils, clear multiples through package-cleanup-oldkernels-count=1

How to troubleshoot firewall problemsHow to troubleshoot firewall problemsAug 11, 2025 pm 01:37 PM

When there is a problem with the firewall, the most direct impact is that the network connection is blocked, and the troubleshooting needs to be carried out in accordance with the steps. First, check whether the firewall is enabled. Linux uses systemctlstatusfirewalld to view it. Windows can view it in the control panel. Second, check whether the rules are too strict or conflicting. For example, ports 22, 80, and 443 are disabled, and the test can be temporarily relaxed. Then check the log information. Linux is in /var/log/messages or journalctl. Windows uses the event viewer to find the interception record. Finally, confirm whether other devices or software such as antivirus software, router ACLs, cloud security groups, etc. are interfered. If necessary, close third-party software or contact the IT department for assistance.

How to update packages using aptHow to update packages using aptAug 11, 2025 pm 01:07 PM

To update Linux system packages, you must first run sudoaptupdate to refresh the source list, otherwise it may cause the installation to fail or the version is too old. 1. Update the software source: execute sudoaptupdate; 2. Upgrade the software package: It is recommended to use sudoaptfull-upgrade to completely upgrade and install new dependencies, but be careful to uninstall conflict packages; 3. Clean useless packages: Use sudoaptautoremove and sudoaptclean to release disk space; in addition, when encountering GPG errors, you should check the key. If you connect to a connection problem, you can try to replace the domestic mirror source. Usually, you can use aptlist-upgradable to view the upgradeable package, or complete it at one time with the command chain.

How to manage cloud instances on Google Cloud Platform GCEHow to manage cloud instances on Google Cloud Platform GCEAug 11, 2025 am 11:16 AM

There are four core points to master when managing cloud instances on Google CloudPlatform (GCE): 1. Select the appropriate machine type, region and operating system according to application needs before creating an instance to avoid excessive configuration; 2. Use unified naming specifications and tags to organize resources to facilitate collaboration and management; 3. Use Metadata and StartupScript to automate the initial configuration of instances to improve efficiency; 4. Use CloudMonitoring and Logging to continuously monitor key indicators and set alerts to ensure the stable operation of the instance.

See all articles

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.