Commonly used Linux important Commands
get list of all installed software
rpm -qa | less
Use following syntax to list the files for already INSTALLED package:
rpm -ql package-name for example :- rpm -ql package
rpm -ql package-name
Type the following command to list the files from rpm package:
rpm -qlp packege.rpm
Remove the rpm packege
rpm -e packege name
Search installed packege
rpm -qa packege name
upgrade the packege
rpm -Uvh packegname.rpm
force fully upgrade the packege
rpm -Uvh –force packege name.rpm
To get all information of packege RPM
[gkhan@linux]$ rpm -qi iptables
Name : iptables Relocations: /usr
Version : 1.3.5 Vendor: CentOS
Release : 5.3.el5_4.1 Build Date: Mon 02 Nov 2009 07:18:37 PM BDST
Install Date: Sun 21 Jul 2013 05:33:10 AM BDST Build Host: builder16.centos.org
Group : System Environment/Base Source RPM: iptables-1.3.5-5.3.el5_4.1.src.rpm
Size : 565736 License: GPL
Signature : DSA/SHA1, Mon 02 Nov 2009 07:26:16 PM BDST, Key ID a8a447dce8562897
URL : http://www.netfilter.org/
Summary : Tools for managing Linux kernel packet filtering capabilities.
Description :
The iptables utility controls the network packet filtering code in the
Linux kernel. If you need to set up firewalls and/or IP masquerading,
you should install this package.
Find out Installation / Uninstallation scripts inside the rpm file
rpm -qp –scripts yourrpm.rpm
Find out Installation / Uninstallation scripts already installed program for example httpd
rpm -q –scripts httpd
To see all services status
service –status-all
service –status-all | grep ntpd
service –status-all | less
To see all services startup status
chkconfig –list
To Start and Stop services on startup
ntsysv
chkconfig service off
chkconfig service on
chkconfig httpd off
chkconfig ntpd on
To check services and running port.
netstat -tulpn
good articles on linux http://www.tecmint.com