SSH Commands Print

  • 7

A few SSH Commands you can use in SSH.

 

cd [foldername]/ - Enter a directory

cd ../ - go back a directory level

cd ~ - go to your home directory

pwd - shows where you are (Print working directory)

ls -alh - Shows you every file in that directory

chmod 755 [filename].php - change filename.php permissions to 775

cp [filename].php next/[filename].php - copys the file to the directory next.

cp -R folder/ folder2 - copys the entire directory to folder2

 

mv [filename].png images/[filename].png - Moves the file to the images directory

vi [filename].php - makes a new file which is empty

 

cat [filename].php - shows you the contents of the file on your screen

nano etc/nameserverips - edits the file nameserverips

rm -rf [filename].php - deletes the file

du -sh - Show a disk use summary for the directory you are in.

 

history - Shows SSH history

screen - enters you into a screen so you can see what other people are doing.

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n - you can check for any DDoSers as it shows all the IPs connected to the server.


Was this answer helpful?

« Back