Installing Software Tools on Linux: Using Vim and GCC

Linux | Red Hat Certification | IT Technology | Operations Engineer

👇 Join our technical exchange QQ group with 1000 members Note: 【Public Account】 for quicker access

Installing Software Tools on Linux: Using Vim and GCC
1. Ways to Install Software on Linux
  1. Source Code Installation

  2. RPM Installation — Linux Package

  3. YUM Installation (best option, can resolve installation sources, versions, and dependency issues)

ping www.baidu.com
Check if currently online (Ctrl + c to stop)
2. rzsz Command
yum list | grep lrzsz (first find lrzsz from the list)
Installing Software Tools on Linux: Using Vim and GCC
yum install -y lrzsz.x86_64 (downloaded from official YUM source, similar to app stores on mobile)
Install lrzsz Command:
sz + filename
Copy files from Linux to Windows:
rz
Copy files from Windows to Linux:
Note: 1. YUM command must be online to uninstall the YUM source installation command 2. yum -y -y is forced download 1. yum remove + command
3. Using Vim and GCC
a. Basic Concepts of Vim
<span>①. Normal/Command Mode (Normal mode)</span>
<span>Controls cursor movement, deletion of characters, words, or lines, copying a segment, and entering Insert mode, or Last line mode</span>
②. Insert Mode (Insert mode)
Text input is only possible in Insert mode; press the “ESC” key to return to Command mode. This mode will be the most frequently used editing mode.
③. Last Line Mode (Last line mode)
File saving or exiting, also allows for file replacement, string searching, listing line numbers, etc. In Command mode, type shift+: to enter this mode. To view all your modes: open Vim and directly input in Last line mode.
Installing Software Tools on Linux: Using Vim and GCC
b. Commands in Command Mode
gg Move cursor to the first line
shift + g Move cursor to the last line
n + shift + g Move cursor to line n
(n) yy Copy the current line and the next n lines (including this line)
(n) p Paste n times to the next line
u Undo
shift + $ Move cursor to the end of the current line
shift + ^ Move cursor to the beginning of the current line
(n) r Replace the character under the cursor with the next n characters (including the current position)
shift + r Enter replace mode to modify content (Esc to exit)
shift + ~ Toggle case
Ctrl + r Redo previous undo
hjkl Move cursor up, down, left, right (h: left j: down k: up l: right)
wb Move cursor across words (w: right b: left)
shift + : + vs + filename
Installing Software Tools on Linux: Using Vim and GCC
Installing Software Tools on Linux: Using Vim and GCC
Open multiple files Ctrl + w + w switch window
Note: If a file does not exist, Vim can only create it upon exiting if saved.
c. Commands in Last Line Mode
w Save
q Quit
wq Save and quit
w + ! Force save
! + command Do not quit Vim, execute command
! + gcc + filename Compile file
set + nu Show line numbers
set + nonu Remove line numbers
Installing Software Tools on Linux: Using Vim and GCC
Installing Software Tools on Linux: Using Vim and GCC
For course inquiries, add: HCIE666CCIE
↑ Or scan the QR code above ↑
What technical points and content do you want to see?
You can leave a message below to let Xiao Meng know!

Leave a Comment