{"id":1088,"date":"2012-10-16T08:35:30","date_gmt":"2012-10-16T08:35:30","guid":{"rendered":"http:\/\/kb.esds.co.in\/?p=1088"},"modified":"2017-11-30T06:46:52","modified_gmt":"2017-11-30T06:46:52","slug":"some-ssh-commands-for-linux-vps-and-dedicated-hosting","status":"publish","type":"post","link":"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/","title":{"rendered":"Some SSH Commands For Linux VPS and Dedicated Hosting"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter wp-image-1089\" title=\"ssh-commands\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2012\/10\/ssh-commands.png\" alt=\"\" width=\"675\" height=\"155\" \/><\/p>\n<p>Below mentioned are some of the commands that can be utilized for <strong>VPS Hosting<\/strong> and <strong>Dedicated Server<\/strong> Monitoring.<\/p>\n<p><strong>Command: top<\/strong><br \/>\n<strong>Description:<\/strong> The top command is used to list all the running processes on the server, along with statistics of CPU usage, memory, I \/ O, load average, and so on &#8230; In the example below, we are indicating to the top command he should be updated every 1 second:<br \/>\n<strong>Example:<\/strong> top d 1<\/p>\n<p><strong>Command: ps<\/strong><br \/>\n<strong>Description:<\/strong> Similar to the top command, it serves to list the running processes on the server. The example below followed aux option is to list all processes and any user.<br \/>\n<strong>Example:<\/strong> ps aux<\/p>\n<p><strong>Command: kill -9<\/strong><br \/>\n<strong>Description:<\/strong> The kill is used to kill a server process by PID. You can find the PID of a process running the command pidof-x followed by the name of the process.<br \/>\n<strong>Example:<\/strong> kill -9 1234<\/p>\n<p><strong>Command: free<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to view the data of the physical memory of the server. Use it with-m for the data to be displayed in megabytes.<br \/>\n<strong>Example:<\/strong> free-m<\/p>\n<p><strong>Command: df<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to list the server partitions and their respective spaces \/ mount points. It is used with the option-h so that the spaces are listed so the user can understand (in kilobytes, megabytes, gigabytes, etc &#8230;)<br \/>\n<strong>Example:<\/strong> df-h<\/p>\n<p><strong>Command: w<\/strong><br \/>\n<strong>Description:<\/strong> This command can be used to list the users connected to the server by the SSH service, besides the load average and uptime.<br \/>\n<strong>Example:<\/strong> w<\/p>\n<p><strong>Commands File Handling<\/strong><\/p>\n<p><strong>Command: cd<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to navigate directories. It is used to go to the root directory, followed by the command to be accessed or followed by 2 points to go back one level.<br \/>\n<strong>Example 1:<\/strong> cd<br \/>\n<strong>Example 2:<\/strong> cd \/ usr<br \/>\n<strong>Example 3:<\/strong> cd ..<\/p>\n<p><strong>Command: cp<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to copy directories and \/ or files. It is used with the option-R to copy all subdirectories of a directory.<br \/>\n<strong>Example 1:<\/strong> cp test.txt test_final.txt<br \/>\n<strong>Example 2:<\/strong> cp-R \/ home \/ directory \/ root<\/p>\n<p><strong>Command: ls<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to list files and directories in a directory etc &#8230; eg. It is used with the option-l for the data to be listed on a single line.<br \/>\n<strong>Example:<\/strong> ls-l<\/p>\n<p><strong>Command: rm<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to remove files and directories. It is used with the-R option to remove it from all files in a directory.<br \/>\n<strong>Example 1:<\/strong> rm test.txt<br \/>\n<strong>Example 2:<\/strong> rm-R \/ home \/ directory<\/p>\n<p><strong>Command: mv<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to move files and directories to other locations or to rename them.<br \/>\n<strong>Example 1:<\/strong> mv test.txt new_test.txt<br \/>\n<strong>Example 2:<\/strong> mv \/ home \/ directory \/ root<\/p>\n<p><strong>Command: mkdir<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to create directories.<br \/>\n<strong>Example:<\/strong> mkdir Test<\/p>\n<p><strong>Command: chmod<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to change the permissions of files and folders. It is used with the desired permission.<br \/>\n<strong>Example:<\/strong> chmod 777 test.txt<\/p>\n<p><strong>Commands: vi or peak (or nano)<\/strong><br \/>\n<strong>Description:<\/strong> These three commands are used to edit files, they are text editors.<br \/>\n<strong>Example:<\/strong> vi test.txt<br \/>\n<strong>Example:<\/strong> peak test.txt<br \/>\n<strong>Example:<\/strong> nano test.txt<\/p>\n<p><strong>Command: tar<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to compress \/ decompress files with .tar, .tar.gz<br \/>\n<strong>Example (compress):<\/strong> tar-zcvf filename.tar.gz test.txt directory1 diretory2<br \/>\n<strong>Example (unpack):<\/strong> tar-zxvf file . tar.gz<\/p>\n<p><strong>Command: zip<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to compress files with. zip<br \/>\n<strong>Example:<\/strong> zip zip file test.txt directory1 diretory2<\/p>\n<p><strong>Command: unzip<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to decompress files with. zip<br \/>\n<strong>Example:<\/strong> unzip zip file<\/p>\n<p><strong>Command: du<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to calculate the total space of a directory or file. It is used with the-h option to display space in Megabyte<br \/>\n<strong>Example 1:<\/strong> du-h<br \/>\n<strong>Example 2:<\/strong> du-h test.txt<\/p>\n<p><strong>Search Commands<\/strong><\/p>\n<p><strong>Command: find<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to find files and directories.<br \/>\n<strong>Example 1:<\/strong> find-name test.txt<br \/>\n<strong>Example 2:<\/strong> find \/ home \/ directory-name *. txt<\/p>\n<p><strong>Command: locate<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to find files and directories.<br \/>\n<strong>Example:<\/strong> locate test.txt<\/p>\n<p><strong>Command: grep<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to get an expression within a file.<br \/>\n<strong>Example:<\/strong> grep word test.txt<\/p>\n<p><strong>Package Installation (programs)<\/strong><\/p>\n<p><strong>Command: yum<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to install packages (programs) on the server. It is used with the install option and the name of the package you want to install. It can also be used to update the packages already installed on the server as kernel and others.<br \/>\n<strong>Example (install):<\/strong> yum install package-name<br \/>\n<strong>Example (update):<\/strong> yum update package-name<br \/>\n<strong>Example (update all):<\/strong> yum update<\/p>\n<p><strong>Several commands<\/strong><\/p>\n<p><strong>Command: exit<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to log out of the terminal \/ session where you are logged.<br \/>\n<strong>Example:<\/strong> exit<\/p>\n<p><strong>Command: reboot<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to restart the server.<br \/>\n<strong>Example:<\/strong> reboot<\/p>\n<p><strong>Command: shutdown<\/strong><br \/>\n<strong>Description:<\/strong> This command is used to restart \/ shutdown the server. It is used with the option-r now to restart or-h now to shut down the server.<br \/>\n<strong>Example (restart):<\/strong> shutdown-r now<br \/>\n<strong>Example (off):<\/strong> shutdown-h now<\/p>\n<p><strong>Quick Commands<\/strong><\/p>\n<p><strong>Command: cat \/ proc \/ cpuinfo | grep &#8216;model name&#8217;<\/strong><br \/>\n<strong>Description:<\/strong> Use it to find out the processor model<\/p>\n<p><strong>Command: service-name service restart<\/strong><br \/>\n<strong>Description:<\/strong> Use it to restart a service like mysql for example. You can also use it in place of the restart to start or stop start, stop a service respectively.<\/p>\n<p><strong>Command: wget www.site.com\/archive.zip<\/strong><br \/>\n<strong>Description:<\/strong> Use it to download files into the server.<\/p>\n<p><strong>Command: wall<\/strong><br \/>\n<strong>Description:<\/strong> Use it to send a message to another user connected to the server via SSH. Put the message to the front of the command you want to send.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below mentioned are some of the commands that can be utilized for VPS Hosting and Dedicated Server Monitoring. Command: top Description: The top command is used to list all the running processes on the server, along with statistics of CPU usage, memory, I \/ O, load average, and so on &#8230; In the example below,&#8230; <\/p>\n<div class=\"clear\"><\/div>\n<p><a href=\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\" class=\"gdlr-button small excerpt-read-more\">Read More<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[69],"tags":[505,506,503,504],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.9.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Some SSH Commands For Linux VPS and Dedicated Servers | SSH Commands<\/title>\n<meta name=\"description\" content=\"SSH Secure Shell Commands For Linux: This KB Talks About SSH Commands That Are Used For Monitoring Linux VPS Hosting Servers, Dedicated Servers and etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Some SSH Commands For Linux VPS and Dedicated Servers | SSH Commands\" \/>\n<meta property=\"og:description\" content=\"SSH Secure Shell Commands For Linux: This KB Talks About SSH Commands That Are Used For Monitoring Linux VPS Hosting Servers, Dedicated Servers and etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\" \/>\n<meta property=\"og:site_name\" content=\"ESDS Official Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ESDSdc\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-16T08:35:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-30T06:46:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2012\/10\/ssh-commands.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:site\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"4 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"ESDS Official Knowledgebase\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.esds.co.in\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2012\/10\/ssh-commands.png\",\"width\":\"678\",\"height\":\"162\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/#webpage\",\"url\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\",\"name\":\"Some SSH Commands For Linux VPS and Dedicated Servers | SSH Commands\",\"isPartOf\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/#primaryimage\"},\"datePublished\":\"2012-10-16T08:35:30+00:00\",\"dateModified\":\"2017-11-30T06:46:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\"},\"description\":\"SSH Secure Shell Commands For Linux: This KB Talks About SSH Commands That Are Used For Monitoring Linux VPS Hosting Servers, Dedicated Servers and etc.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/some-ssh-commands-for-linux-vps-and-dedicated-hosting\/\",\"name\":\"Some SSH Commands For Linux VPS and Dedicated Hosting\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\",\"name\":\"ESDS ADMIN\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5618393df3c15e5b6b3b9ef917e83827?s=96&d=mm&r=g\",\"caption\":\"ESDS ADMIN\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1088"}],"collection":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/comments?post=1088"}],"version-history":[{"count":11,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1088\/revisions"}],"predecessor-version":[{"id":3445,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1088\/revisions\/3445"}],"wp:attachment":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/media?parent=1088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/categories?post=1088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/tags?post=1088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}