定义系统快捷键:System->Preferences->Keyboard shortcuts, 例如可以将启动一个终端窗口(Run a terminal)定义为alt+0;
Firewall
启动系统防火墙:service iptables start
关闭系统防火墙:
-
service iptables save
-
service iptables stop
-
chkconfig iptables off
Package Management
-
列出可以repo:
yum repolist
-
搜索可用源:
yum search <package_name>
-
安装:
rpm -ivh <package_name>
(或者图形界面中双击rpm文件) -
卸载:首先查看要卸载的包的确切名字:
rpm -qa|grep <package_name>
, 然后rpm -e <package_name>
下面以卸载BOUML为例说明:
[chad@bogon ~]$ rpm -qa|grep bouml
bouml-5.1.4-1.i686
[root@bogon chad]# rpm -e bouml-5.1.4-1.i686
[root@bogon chad]# bouml
bash: bouml: command not found
修改CentOS repo:
/etc/yum.repos.d/
下的文件定义了yum的源列表,
如果yum update
报没有更新源,可能是repo被关闭了,
修改这个文件夹中*.repo
文件中的baseurl
和enabled
属性。
Ref: RPM Command: 15 Examples to Install, Uninstall, Upgrade, Query RPM Packages