Ubuntu命令安装/卸载软件
环境:
Ubuntu 20.04.2 LTS Desktop
安装软件
卸载软件
1.打开一个终端, 输入 dpkg --list
, 按下 Enter键, 终端输出以下内容, 显示的系统中安装的所有软件
$ dpkg --list
2.在终端中找到你需要卸载的软件的名称,列表是按照首字母排序的
3.在终端上输入命令 sudo apt-get --purge remove 包名
(--purge
是可选项, 写上这个属性是将软件及其配置文件一并删除, 如不需要删除配置文件, 可执行sudo apt-get remove 包名
)
此处我要删除的是 xrpd,那么在终端输入 sudo apt-get --purge remove xrdp
, 按下回车, 输入密码, 再次回车
卸载软件并删除配置文件
$ sudo apt-get --purge remove APP-NAME
如不需要删除配置文件
$ sudo apt-get remove APP-NAME
Ubuntu sudo gedit修改环境变量出错 No protocol specified
环境: Ubuntu 20.04.2 LTS Desktop
1.问题描述
尝试修改环境变量,使用 sudo gedit /etc/profile
报错:
~$ sudo gedit /etc/profile
No protocol specified
Unable to init server: Could not connect: Connection refused
(gedit:4331): Gtk-WARNING **: 09:58:47.068: cannot open display: :10.0
** (gedit:4391): WARNING **: 10:11:05.322: Could not load theme icon text-x-generic: Icon 'text-x-generic' not present in theme Adwaita
Ubuntu Xrdp 远程登录需要输入很多次密码授权来"创建/移除"色彩管理设备
环境: Ubuntu 20.04.2 LTS
问题描述
使用 xrdp远程登录 Ubuntu,可能会出现弹框要求输入密码
描述信息一般是:
- 需要授权来创建色彩管理设备 / Authentication is required to create a color managed device
- 需要授权来移除色彩管理设备 / Authentication is required to remove a color managed device
- 刷新系统软件源需要认证 / Authentication is required to refresh the system repositories
Ubuntu环境变量——系统变量和用户变量
按变量的生存周期来划分,Linux变量可分为两类:
1. 永久的:需要修改配置文件,变量永久生效。
2. 临时的:使用export命令声明即可,变量在关闭shell(Terminal/BASH)时失效。