Commonly used linux yum commands and vim commands, these should be memorized

yum (Yellow dog Updater, Modified) is a Shell front-end package manager in Fedora and RedHat and SUSE.

Based on RPM package management, it can automatically download and install RPM packages from a specified server, automatically handle dependency relationships, and install all dependent software packages at one time without tedious downloading and installation again and again.

Yum provides commands to find, install, and delete a certain, a group or even all software packages, and the commands are concise and easy to remember.

yum syntax

yum [options] [command] [package ...]

  • options: optional, options include -h (help), -y (select all "yes" when prompted during the installation process), -q (do not display the installation process) and so on.

  • command: the operation to be performed.

  • The object of the package operation.

Common yum commands

  • 1. List all updateable software list command: yum check-update

  • 2. Update all software commands: yum update

  • 3. Only install the specified software command: yum install <package_name>

  • 4. Only update the specified software command: yum update <package_name>

  • 5. List all installable software list command: yum list

  • 6. Delete the package command: yum remove <package_name>

  • 7. Find the package command: yum search <keyword>

  • 8. Clear cache command:

    • yum clean packages: clear the packages in the cache directory

    • yum clean headers: clear the headers in the cache directory

    • Yum clean oldheaders: Clear old headers in the cache directory

    • yum clean, yum clean all (= yum clean packages; yum clean oldheaders) : Clear the packages and old headers in the cache directory

All Unix Like systems will have a built-in vi text editor, and other text editors may not exist.

但是目前我们使用比较多的是 vim 编辑器。

vim 具有程序编辑的能力,可以主动的以字体颜色辨别语法的正确性,方便程序设计。

什么是 vim?

Vi是从 vi 发展出来的一个文本编辑器。代码补完、编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用。

简单的来说, vi 是老式的字处理器,不过功能已经很齐全了,但是还是有可以进步的地方。

vim 则可以说是程序开发者的一项很好用的工具。连 vim 的官方网站自己也说 vim 是一个程序开发工具而不是文字处理软件。

vim 键盘图:

vi/vim 的使用

基本上 vi/vim 共分为三种模式,分别是命令模式(Command mode),输入模式(Insert mode)和底线命令模式(Last line mode)。

这三种模式的作用分别是:

命令模式:

用户刚刚启动 vi/vim,便进入了命令模式。

此状态下敲击键盘动作会被Vim识别为命令,而非输入字符。比如我们此时按下i,并不会输入一个字符,i被当作了一个命令。

以下是常用的几个命令:

  • i 切换到输入模式,以输入字符。

  • x 删除当前光标所在处的字符。

  • : 切换到底线命令模式,以在最底一行输入命令。

若想要编辑文本:启动Vim,进入了命令模式,按下i,切换到输入模式。

命令模式只有一些最基本的命令,因此仍要依靠底线命令模式输入更多命令。

 输入模式:

在命令模式下按下i就进入了输入模式。

在输入模式中,可以使用以下按键:

  • 字符按键以及Shift组合,输入字符

  • ENTER,回车键,换行

  • BACK SPACE,退格键,删除光标前一个字符

  • DEL,删除键,删除光标后一个字符

  • 方向键,在文本中移动光标

  • HOME/END,移动光标到行首/行尾

  • Page Up/Page Down,上/下翻页

  • Insert, switch the cursor to input/replace mode, the cursor will become a vertical bar/underline

  • ESC, exit input mode, switch to command mode

 Bottom line command pattern:

In the command mode, press: (English colon) to enter the bottom line command mode.

The bottom line command mode can enter single or multiple character commands, and there are many available commands.

In bottom-line command mode, the basic commands are (colons have been omitted):

  • q exits the program

  • w save file

Press the ESC key to exit the bottom line command mode at any time. We can think of these three modes as the icons below:

Finally: The following complete software testing video learning tutorial has been sorted out and uploaded. Friends can get it for free if they need it [Guaranteed 100% free]

insert image description here

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

picture

Guess you like

Origin blog.csdn.net/weixin_50829653/article/details/130645190