如何通过终端安装软件中心提供的软件?

Ham*_*eer 4 software-center installation

谁能帮我提供终端命令来下载和安装软件中心提供的软件?

实际上,我正在搜索通过终端下载和安装 KDbg(调试器)的命令。

Adi*_*tya 5

简短而甜蜜:

在终端中运行以下命令进行安装kdbg

sudo apt-get update
sudo apt-get install kdbg
Run Code Online (Sandbox Code Playgroud)

通用解决方案:

apt-get是用于安装/更新/删除软件的命令行包管理工具。要安装任何软件,您可以运行以下命令:

sudo apt-get update   # This updates/synchronizes the package index files with the update server (not always necessary to run this command, but preferred)
sudo apt-get install <package_name>   # This command actually installs the package
Run Code Online (Sandbox Code Playgroud)

大多数情况下与<package_name>您要安装的软件的名称相同。但是,如果您似乎无法弄清楚包的名称,那么您有几个选择。

假设您要安装dconf Editor - 它的包名与其名称不同。

1. GUI - 使用 Ubuntu 软件中心:

搜索您要安装的软件,然后查看该Version字段。它由用空格分隔的两部分组成,空格前的第一部分是包名,第二部分给出版本信息。对于 dconf 编辑器,包名称是dconf-tools.

南加州大学

2. 命令行 - 使用apt-cache

我们运行命令 apt-cache search <software_name>

$ apt-cache search dconf
dconf-gsettings-backend - simple configuration storage system - GSettings back-end
dconf-service - simple configuration storage system - D-Bus service
dconf-tools - simple configuration storage system - utilities
libc-bin - Embedded GNU C Library: Binaries
libdconf-dbg - simple configuration storage system - debugging symbols
libdconf-dbus-1-0 - simple configuration storage system - D-Bus library
libdconf-dbus-1-dbg - simple configuration storage system - D-Bus debug symbols
libdconf-dbus-1-dev - simple configuration storage system - D-Bus development files
libdconf-dev - simple configuration storage system - development files
libdconf-doc - simple configuration storage system - documentation
libdconf1 - simple configuration storage system - runtime library
asoundconf-gtk - Applet to select the default ALSA sound card
dconf - collect system information
libdconf-qt-dev - dconf Qt bindings (development files)
libdconf-qt0 - dconf Qt bindings (library)
libgrabcd-readconfig-perl - rip and encode audio CDs - common files
libmed-tools - Runtime tools to handle MED files
xnetcardconfig - A simple network card configuration wizard for X
Run Code Online (Sandbox Code Playgroud)

这列dconf-tools在第三位。不是很有帮助,但在大多数情况下仍然足够好。

我几乎总是倾向于使用apt-cache,如果不满意,则使用 Ubuntu 软件中心。


提示:使用模拟apt-get

如果不太确定,请使用-s标志 withapt-get来模拟命令的工作。确保将标志放在最后。因此,运行命令为:

sudo apt-get install <package_name> -s
Run Code Online (Sandbox Code Playgroud)