Common SSH Commands for Linux / CentOS / Red Hat

Posted on January 22, 2015
by Seth Harden

Folder Navigation

Move into a directory:
cd foldername

Go up a directory level
cd ..

Go back to home directory
cd ~

Create a new folder
mkdir [directory name]

Files

Change file permissions
chmod 755 index.php

Delete a folder / directory and all of its contents:
rm -r -f

Create or edit a file
vi newfile.txt

Read a file
cat index.html

Delete a file
rm oldfile.php

Unzip a file on the server
unzip filename.zip

System Information

Show processes currently running on the server
ps -auxf

Other SSH Commands
Check Your INODE Count / Usage

SSH Restarting Apache

RESTART APACHE 2

/etc/init.d/apache2 restart

START SERVICES

APACHE WEB SERVICE

 /opt/psa/admin/bin/websrvmng --start

PLESK WEB SERVER

/etc/init.d/sw-cp-server start

PLESK PHP ENGINE

/opt/psa/admin/sbin/pleskrc sw-engine start

DNS SERVER BIND

/opt/psa/admin/bin/dnsmngĀ  --start

RESTART APACHE 2

[/code]plesk db[/code]