Yum
yum install <package-name> #install packageyum remove <package-name> #remove packageyum erase <package-name> #delete package
yum search <keyword> #search if exsit package containing keyword
yum repolist #show repository list
yum update #update installed packages
Good site searching for repos: Linux packages search
How to add a yum repository mannually
Yum repository directory is located at /etc/yum.repos.d/, so if you have a yum .repo file, just copy this file into the directory.
And there are some repositories wrapped as rpm files, such as postgreSQL. What you need to do is to download the rpm files and install them.
See Also: Adding, Enabling, and Disabling a Yum Repository
See Also: Adding, Enabling, and Disabling a Yum Repository
RPM
rpm -i <package-name>.rpm #install rpm packagerpm -qa | grep <package> #check if installedPS
ps #show processps -l #Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD
ps aux | grep <keyword> #show details of processKill
kill [signal] PID #kill specified process using pid, most used is '-9' to kill process.kill -l #display all the [signal]skill `ps | grep <keyword> | awk '{print $1}'` #kill process by <keyword>TOP
top #display all processtop -user <user> #display <user>'s processtop -pid <pid> #display process by given <pid>service
service <service-name> status #show service status(running or stopped)service <service-name> start #start serviceservice <service-name> stop #stop servicehostname
hostname #show hostnamehostname --fqd #show fully qualified domain name(FQDN)hostname NEW_NAME #change hostname temporarySee also: How to Change the Hostname of a Linux System
restart the network
/etc/init.d/network restart #!Red Hat Specific, may not applicable in other linux
Add third-party repositories
EPEL: see here
User
Add useruserdel user #delete useruseradd -G <group-name> <username> #add user to non-existed groupuseradd -g <group-name> <username> #add user to primary group
usermod -a -G <group-name> <username> #add a existing user to existing group
usermod -g <group-name> <username> #change user's primary group to <group-name>
passwd <username> #setup password for userid <username> #show user information
tar
tar -zxvf <file-name>.tar.gz #extract tar.gz file
Netstat
netstat -a #list all ports of TCP/UDP
netstat -at #list TCP connection
netstat -au #list UDP connection
netstat -l #list all listening ports