Ubuntu 的软件安装方式一般有:
1. 使用源安装
a. 这也是Ubuntu 下面最常用的一种软件安装方式,同时他的操作相对也是非常容易的,因为 它可以和Window操作系统上面一样,可以去软件中心里面去查找
你所安装的软件,然后 remove 就行了。这是一种图形化的操作方式。(相对另外一种来说是容易一些)
b. 源安装还有另一种安装方式,就是命令行的方式。打开 terminal 终端:
1.安装命令:
sudo apt-get install software_name
2.删除命令:
sudo apt-get remove software_name
2.安装 deb 文件
这也是Ubuntu下面相对来说另外一种比较多安装方式。但是安装 deb格式的软件后,我们有时在软件中心里并不能找到相关在 信息来删除它。这时就要我们使用相关的
命令来查询和删除它。
1. 安装
sudo dpkg install software_name
2 .查询安装软件
dpkg -l(小写的L) 或者 dpkg --list pattern_name
也可以使用grep 来过滤关键字。
dpkg -l | grep key_word
下面以安装 scrt 文件 为例:
-
[XXXX@Ubuntu:shell]$ dpkg -l | grep scrt
-
ii scrt 7.0.2-418 SecureCRT
3. 查看 安装软件 scrt 的详细信息:
-
[XXXX@Ubuntu:shell]$ dpkg -l | grep scrt
-
ii scrt 7.0.2-418 SecureCRT
-
[XXXX@Ubuntu:shell]$ dpkg --status scrt
-
Package: scrt
-
Status: install ok installed
-
Installed-Size: 32078
-
Maintainer: VanDyke Software, Inc. <support@vandyke.com>
-
Architecture: amd64
-
Version: 7.0.2-418
-
Description: SecureCRT
-
Copyright: Copyright (C) 1995-2012 VanDyke Software, Inc.
-
SecureCRT for Linux combines rock-solid terminal emulation
-
with the strong encryption, broad authentication options, and
-
data integrity of the Secure Shell protocol. SecureCRT offers
-
a tabbed interface, advanced session management and customization,
-
built-in scripting, local shell support, and extensive emulations
-
including VT100, VT102, VT220, ANSI, SCO ANSI, Wyse 50/60, Xterm,
-
and Linux console.
其中的 dpkg --status 也可以简写为 dpkg -s(小写的S) scrt
或者 也可以使用下面命令来查询详细信息:
-
[XXXX@Ubuntu:shell]$ dpkg -p scrt
-
Package: scrt
-
Installed-Size: 32078
-
Maintainer: VanDyke Software, Inc. <support@vandyke.com>
-
Architecture: amd64
-
Version: 7.0.2-418
-
Size: 9762344
-
Description: SecureCRT
-
Copyright: Copyright (C) 1995-2012 VanDyke Software, Inc.
-
SecureCRT for Linux combines rock-solid terminal emulation
-
with the strong encryption, broad authentication options, and
-
data integrity of the Secure Shell protocol. SecureCRT offers
-
a tabbed interface, advanced session management and customization,
-
built-in scripting, local shell support, and extensive emulations
-
including VT100, VT102, VT220, ANSI, SCO ANSI, Wyse 50/60, Xterm,
-
and Linux console.
dpkg -s 和 -p 的选项查询出来信息基本一样。只一个选项是不同的:
-s 有一个软件的安装状态 :
-
Status: install ok installed
-p 选项有一个软件文件的大小 也就是那个 deb文件的大小:
也是 -s 选项显示的是安装的详细信息
-p 选项显示的安装前的那个deb文件的信息。
3 。查询文件的安装文件所在目录命令:
-
[XXXX@Ubuntu:shell]$ dpkg -L scrt | more
-
/.
-
/usr
-
/usr/share
-
/usr/share/applications
-
/usr/share/applications/SecureCRT.desktop
-
/usr/local
-
/usr/local/share
-
/usr/local/share/vandyke
-
/usr/local/share/vandyke/data
-
/usr/local/share/vandyke/data/securecrt_64.png
-
/usr/local/share/doc
-
/usr/local/share/doc/securecrt
-
/usr/local/share/doc/securecrt/SecureCRT_HISTORY.txt
-
/usr/local/share/doc/securecrt/SecureCRT_README.txt
-
/usr/local/share/doc/securecrt/SecureCRT_EULA.txt
-
/usr/local/share/doc/securecrt/SecureCRTHelp
-
/usr/local/share/doc/securecrt/SecureCRTHelp/Application_Object.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whd_toc1.gif
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whd_show2.gif
-
/usr/local/share/doc/securecrt/SecureCRTHelp/Disabling_ZModem.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/Introduction_to_SysAdmin_Is.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/How_to_Register.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/Session_Options_Dialog.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whd_topic.xml
-
/usr/local/share/doc/securecrt/SecureCRTHelp/button-paste.bmp
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whd_toc4.gif
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whghost.js
-
/usr/local/share/doc/securecrt/SecureCRTHelp/button-newfolder_osx.bmp
-
/usr/local/share/doc/securecrt/SecureCRTHelp/whgdef.htm
-
/usr/local/share/doc/securecrt/SecureCRTHelp/Security_Considerations.htm
4 . 删除软件的相关命令:
sudo dpkg -r -P scrt 这是删除删除软件同时也一同删除配置文件。
sudo dpkg -r scrt 这是只删除软件, 不删除配置文件信息。
(责任编辑:IT) |