# Renew dhcp ip address
sudo dhclient -r
sudo dhclient
sudo dhclient -r eth0
sudo dhclient eth0
# Find runlevel of the system (multi-user.target=runlevel3, graphical.target=runlevel5)
systemctl get-default
# Set runlevel
systemctl set-default graphical.target
# View running services
service --status-all
chkconfig --list
# Cli gui to set startup services
ntsysv
# Cli to start/stop a service on startup
sudo chkconfig mongod off
sudo chkconfig mongod on
# Start service
sudo service rabbitmq-server start
# View open ports and the service using them
sudo netstat -tulpn
# Is the firewall running
firewall-cmd --state
# Which firewall zone are you using
firewall-cmd --get-active-zones
# View allowed firewall ports
firewall-cmd --list-ports
# Add firewall port
firewall-cmd --zone=public --add-port=2888/tcp --permanent
firewall-cmd --reload
# Disable / Stop / Status / Start / Enable of firewalld
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
systemctl start firewalld
systemctl enable firewalld
# List users in rabbitmq
sudo rabbitmqctl list_users
# Add user to rabbitmq
sudo rabbitmqctl add_user username1 password1
# Make a user administrator inrabbitmq
sudo rabbitmqctl set_user_tags username1 administrator
# Copy a folder
cp -r /home/hope/files/* /home/hope/backup
# Install Gnome
yum groups install "GNOME Desktop"
startx
systemctl set-default graphical.target
# Turn off SELinux
vim /etc/sysconfig/selinux
SELINUX=disabled
# Open file up in chrome from CMD
google-chrome index.html
# Quick view of system resource usage
free -h
# Create symbolic link
ln -s path/target path/source
# View file location of running process
ps -ef | grep node