{"id":668,"date":"2021-07-23T12:35:12","date_gmt":"2021-07-23T12:35:12","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-access-the-command-line\/"},"modified":"2021-07-23T12:35:12","modified_gmt":"2021-07-23T12:35:12","slug":"how-to-access-the-command-line","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-access-the-command-line\/","title":{"rendered":"How to Access the Command Line"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>While cPanel &#038; WHM automates many server administration tasks, familiarity with the Linux command line (CLI) can prove useful for both WHM and cPanel users. This documentation describes how to access the command line.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>cPanel &#038; WHM requires the <code>root<\/code> user to use BASH by default. System administrators can modify the shell for other users.<\/li>\n<li>In cPanel &#038; WHM version 72 and later, you can use cPanel\u2019s <em>Terminal<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Advanced &gt;&gt; Terminal<\/em>) or WHM\u2019s <em>Terminal<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Advanced &gt;&gt; Terminal<\/em>) to access the command line from within the interface.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"access-the-command-line\">Access the command line<\/h2>\n<p>To access your cPanel &#038; WHM server from the command line, perform the<br \/>\nfollowing steps:<\/p>\n<ol>\n<li>\n<p>Use the correct method for your computer\u2019s operating system to open the CLI:<\/p>\n<ul>\n<li><strong>Microsoft Windows\u00ae<\/strong> \u2014 Open the Command Prompt program. To do this, click <em>Start<\/em> and enter <code>Command Prompt<\/code> in the <em>Search<\/em> text box. Double-click <em>Command Prompt<\/em> in the list that appears.<\/li>\n<li><strong>macOS\u00ae<\/strong> \u2014 Open the Terminal program. To do this, click the <em>Applications<\/em> icon in the dock, click the <em>Utilities<\/em> icon, and then click the <em>Terminal<\/em> icon.<\/li>\n<li><strong>Ubuntu\u00ae<\/strong> \u2014 Open the Terminal program. To do this, press the <code>Ctrl<\/code>, <code>Alt<\/code>, and <code>T<\/code> keys simultaneously.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Your CLI program opens with access to the local computer. You <strong>must<\/strong> use SSH to access the cPanel &#038; WHM server. To do this, enter the following command and press Enter:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">ssh username@hostname<\/code><\/pre>\n<\/div>\n<p>In this comment, <code>username<\/code> is your account\u2019s username and <code>hostname<\/code> is the server\u2019s hostname. For example, to log in as the <code>root<\/code> user on the <code>example.com<\/code> server, run the following command:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">ssh root@example.com<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>The CLI prompts you for the account\u2019s password. Enter it and press Enter.<\/p>\n<\/li>\n<li>\n<p>The CLI\u2019s display will appear similar to the following example:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">Last login: Fri Feb  <span style=\"color:#ae81ff\">6<\/span> <span style=\"color:#ae81ff\">12<\/span>:50:38 on ttys000\nMyComputer:~ myname$ ssh username@example.com\nPassword:\nLast login: Fri Feb  <span style=\"color:#ae81ff\">6<\/span> <span style=\"color:#ae81ff\">12<\/span>:52:33 <span style=\"color:#ae81ff\">2015<\/span> from <span style=\"color:#ae81ff\">10<\/span>.1.4.202\nusername@example <span style=\"color:#f92672\">[<\/span>~<span style=\"color:#f92672\">]<\/span>#<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p>You can now navigate the server\u2019s file system and run commands, within the limits of your account\u2019s permissions on the server.<\/li>\n<\/ol>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>If you receive an error message that appears similar to the following example, you may not have SSH privileges enabled on the server.<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">ssh: connect to host example.com port <span style=\"color:#ae81ff\">22<\/span>: Connection refused<\/code><\/pre>\n<\/div><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview While cPanel &#038; WHM automates many server administration tasks, familiarity with the Linux command line (CLI) can prove useful for both WHM and cPanel users. This documentation describes how to access the command line. Note: cPanel &#038; WHM requires the root user to use BASH by default. System administrators can modify the shell for &hellip;<\/p>\n","protected":false},"author":1,"featured_media":669,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/668"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/669"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}