Читать книгу Mastering Linux System Administration - Richard Blum - Страница 66

Real World Scenario INSTALLING SOFTWARE SNAPS

Оглавление

The stress‐ng application allows you to stress test the CPU, memory, disk, and other features on your Linux system. Use the snap install command to install the stress‐ng snap application package on your Linux system following these steps:

1 Log into your Ubuntu server using the sysadmin account you created in Chapter 2.

2 At the command line, enter the command sudo snap install stress‐ng. Enter your user password when prompted. You should see the following output: [sudo] password for sysadmin: stress-ng V0.11.24 from Colin King (cking-kernel-tools) installed $

3 At the command line, enter the command snap list to see if the stress‐ng snap package has been installed. You should see the following output: Name Version Rev Tracking Publisher Notes core18 20200929 1932 latest/stable canonical* base lxd 4.0.4 18150 4.0/stable/… canonical* - snapd 2.47.1 9721 latest/stable canonical* snapd stress-ng V0.11.24 5273 latest/stable cking-kernel-tools - $

When you install a snap package, the snapd program mounts it as a drive. You can see the new snap mount by using the mount command.

$ mount … /var/lib/snapd/snaps/stress-ng_5273.snap on /snap/stress-ng/5273 type squashfs (ro,nodev,relatime,x-gdu.hide) $

If you need to remove a snap, just use the snap remove command.

$ sudo snap remove stress-ng stress-ng removed $

As the snap is removed, you'll see some messages about the progress of the removal. Instead of removing a snap, if you prefer, you can just disable it without removing it. Just use the snap disable command. To reenable the snap, use the snap enable command.

Mastering Linux System Administration

Подняться наверх