Common Putty Commands To Manage Linux/Ubuntu VPS


SUBMITTED BY: mrhero

DATE: Jan. 6, 2017, 10:08 p.m.

FORMAT: Text only

SIZE: 3.7 kB

HITS: 1359

  1. If you are running a Linux VPS server then you must learn to manage VPS server. You will face many types of bucks errors like server down, need to changer VPS password, rename or delete old directory. So You should learn some common putty commands to manage Ubuntu or Linux VPS server.In this article, I am sharing with you some common putty commands to manage VPS server.
  2. What Is PuTTy?
  3. PuTTY is an open source program that you can use to perform network protocol SSH, Telnet, and Rlogin. Actually putty is just one piece of software that can be used on a Windows operating system to access a VPS (virtual private server) that is based on Linux.
  4. This can be used, for example, when configuring CGI scripts. SSH is included with many modern operating systems including Mac ® OS X and Linux distributions.Y can download putty from here: PuTTy
  5. If you don’t know how to use putty then you can check this How To Login To The VPS With Putty.
  6. Common Putty Commands
  7. 1. Change Password
  8. passwd
  9. To change password type passwd then enter the old password and again type a new password, again verify the new password.
  10. 2. Update and Upgrade
  11. apt-get update
  12. apt-get -s upgrade
  13. 3. How to find the current directory
  14. pwd
  15. Type pwd to see where on the server you are.
  16. For example, if I type pwd in PuTTy it returns /root
  17. 4. Navigate
  18. cd
  19. The cd command (also known change directory) is used to navigate to a specified directory on your server.
  20. Such as: cd /home (moves you into the home folder)
  21. If you want to come into same directory then enter
  22. cd.
  23. 5. How to get root access without root user details?
  24. sudo su
  25. 6. How to move and rename file
  26. Use this command to move and rename file
  27. mv
  28. example: moving a file to another directory
  29. mv earngurus.jpg home/earngurus.jpg
  30. moving a file to another directory and renaming it at once
  31. mv image.jpg home/image2.jpg
  32. 7. How to delete / remove a file
  33. rm [file name]
  34. example:
  35. rm earngurus.jpg
  36. 8. Copying a file
  37. cp
  38. To copy a file just use the cp ssh command.
  39. Example:
  40. cp file.php /home/file.php
  41. Copy a folder with all files
  42. cp -r
  43. This one is used to copy the entire folder with all its contents.
  44. Copy and rename
  45. cp file.php /home/file2.php
  46. 9. How to copy a folder with all files and folders in it
  47. cp -r [directory] [new directory]
  48. 10. How to create new folder
  49. mkdir [folder name]
  50. example:
  51. mkdir image
  52. 11. Search for a file
  53. find . -name [filename] -print
  54. example: find a file called “file.jpg” in current folder
  55. find . -name file.jpg -print
  56. 12. Create a file
  57. touch
  58. Use the touch command to create different files and file extensions (you can later edit them)
  59. Example: touch index.php, touch index.html, touch robots.txt
  60. 13. how to change file permission
  61. chmod [permission type] [file/folder name]
  62. example:
  63. chmod 777 index.php
  64. 14. How to list files and/or directories in a directory
  65. ls
  66. list all files and information
  67. ls -al
  68. Show contents with file size
  69. ls -h
  70. 15. Create a new user account
  71. adduser
  72. 16. Compressing folders
  73. zip -r foldername.zip foldername
  74. example: zip -r newfolder.zip newfolder
  75. 17. Decompressing folders
  76. unzip
  77. Example: unzip newfolder.zip
  78. 18. Compressing folders using tar -czvf
  79. tar -czvf foldername.tar.gz foldername
  80. Example: tar -czvf wp-content.tar.gz wp-content
  81. 19. Decompressing folders using tar -czvf
  82. tar -xvf foldername.tar.gz
  83. Example: tar -xvf wp-content.tar.gz
  84. 20. check usage memory
  85. free -m
  86. 21. Monitor CPU, processes and memory
  87. top
  88. 22. Display sever disk usage
  89. df -h
  90. If you want to know more then comment here I update this article.

comments powered by Disqus