[002] Software management and common shortcut operations in Linux system (including root password reset)

Total Article 78

In the following articles, the system is Red Hat Enterprise Linux 8.0operated by version, which is also the version most used by enterprises at present. I hope that it can inspire you after reading the article.

1. Reset the rootadministrator password

Sometimes you may Linuxforget the system password. Don’t panic, you can reset it in just a few steps. First of all, you should determine whether your system is the RHEL8version. If it is, then proceed to the next operation. My system is as shown in the figure below:

v2-91589006067c8c6f892626dd92e58ede_b.png

At this point, restart the Linuxsystem and when the boot interface appears, press the key on the keyboard eto enter the kernel editing interface, as shown in the following figure:

v2-f20ade4f7ccccfa06d668c357a32e85d_b.jpg

In linuxparameters appended at the end of the line rd.breakparameters, and then press Ctrl + Xrun modified kernel, as shown below:

v2-2e6c35933c520e812d276b2e7e200531_b.jpg

After 20sabout or so, the system enters the emergency rescue mode, and then enter the following commands in sequence, wait for the system to restart, and then you can log in with the new password.

mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel
exit
reboot

2. RPMRed Hat Package Manager

Before the RPM(RedHat Package Manager)release, if you want Linuxto install the software in the system , you can only install it in the form of a source package. This is a very difficult thing. Many times we have to consider the dependencies between other programs when installing, uninstalling, and upgrading programs. The operation is quite difficult.

RPMIt is designed to solve these problems. It is very similar Windowsto the control panel in China. It will establish a unified database, record software information in detail and automatically analyze dependencies. It is currently RPMused by multiple Linuxsystems. RPMA package is a pre- Linuxcompiled and packaged file on the host, which is very quick to install. A few commonly used commands are listed below:

Command format A detailed description
rpm - help View rpm help and parameter details
rpm - ivh filename.rpm Command format for installing software
rpm - Uvh filename.rpm Command format for upgrading software
rpm - e filename.rpm Command format for uninstalling software
rpm - qpi filename.rpm Command format for querying software description information
rpm - qpl filename.rpm Command format for listing software file information
rpm - qf filename Command format to query which RPM the file belongs to

For a RPMpackage name: "goodaa-4.20-454.el8_4.5.x86_64", it means the following:

v2-99e995ce2d643137874ddc232120e727_b.jpg

RPMA feature of the package is that it is a specified operating system version, and RHEL8the RPMpackage can only be installed in this version of the Linuxsystem. In addition, the end of i686the RPMpackage is the ending package, which is a 32-bit package.

3. YUMSoftware warehouse

RPMIt is to simplify the complexity of the installation, and YUM(Yellow dog Updater, Modified)to further reduce the complexity and resolve dependencies between packages and design. YUMThe software warehouse analyzes the required software packages and their related dependencies according to user requirements, and then automatically downloads the software packages from the server and installs them to the system.

YUMThe following common commands can be used yum - helpto view all.

command effect
yum repolist all List all warehouses
yum list all List all packages in the warehouse
yum install Install all
yum install package1 Install the specified package package1
yum groupinstall group1 Installer group group1
yum reinstall re-install
yum update Update all
yum check-update Check for updateable programs
yum info package1 Display information about package package1
yum list Show all installed and installable packages
yum remove package1 Delete package package1
yum deplist package1 View the dependencies of package package1
yum clean all Clear all warehouse caches
yum clean packages Clear the package in the cache directory
yum clean headers Clear headers in the cache directory

4. LinuxShortcut keys commonly used in the system

The most basic shortcuts are:

  • Press the up and down arrow keys to view historical input commands;
  • Press the Tabkey to completion of both command names or directory, if not the only, and several times, will come out the appropriate list;
  • !lsRepeat the last lscommand starting with;

CtrlThe shortcut operations with key combinations are as follows:

hot key Function description
a The cursor jumps to the beginning of the line
b Move the cursor one letter to the left
c Kill the current process
d Delete the last character of the prompt or Exit or logout
e Move the cursor to the end of the line
f Move back one character
h Delete the character before the cursor, same as the backspace key
k Clear the content after the cursor to the end of the line
l Clear the screen, equivalent to clear
p Repeat the last command
r Search for previously entered commands
u/w Clear everything from the cursor to the beginning of the line
x/z Transfer the current process to the background, use "fg" command to restore

This concludes this article! Continue to the next part!

If it helps you, please pick points praise or appreciation ! Pay attention to this column and share more dry goods with you.

=======================================================

Welcome [ Follow, Private Message @武三郎] . We communicate and progress together.

Guess you like

Origin blog.csdn.net/huixieqingchun/article/details/109718258