{"id":8991,"date":"2026-05-30T01:48:59","date_gmt":"2026-05-29T23:48:59","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=8991"},"modified":"2026-06-03T03:43:12","modified_gmt":"2026-06-03T01:43:12","slug":"ssh-commands-pwd","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-pwd\/","title":{"rendered":"SSH Commands: PWD"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">In server administration, backend web development, and cloud systems engineering, managing remote environments via <strong>Secure Shell (SSH)<\/strong> requires continuous awareness of your current position within the server&#8217;s file system tree.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><code>pwd<\/code><\/strong> command stands for <strong>Print Working Directory<\/strong>. It is a fundamental, POSIX-standard command-line utility used to display the exact file path of the directory you are currently working in.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-pwd\/#Understanding_Absolute_vs_Relative_Pathways\" >Understanding Absolute vs. Relative Pathways<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-pwd\/#Command_Execution_and_Output_Analysis\" >Command Execution and Output Analysis<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Understanding_Absolute_vs_Relative_Pathways\"><\/span>Understanding Absolute vs. Relative Pathways<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<\/div>\n\n<div id=\"mybox-3296547558\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">When you execute commands inside a terminal window, you are always positioned within a specific folder called your current working directory. The <code>pwd<\/code> command returns the <strong>absolute path<\/strong> to this folder.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Absolute Paths:<\/strong> A complete, unambiguous route that defines a file or folder&#8217;s position from the absolute base of the file system. It always begins with a forward slash (<code>\/<\/code>), which represents the root directory of the server. An example of an absolute path within a shared hosting ecosystem is <code>\/home\/mybox\/yourlogin<\/code>.<\/li>\n\n\n\n<li><strong>Relative Paths:<\/strong> A path built in relation to your current working position rather than the system root. For example, if you are inside your home folder and want to navigate into a subfolder named <code>public_html<\/code>, the string <code>public_html<\/code> is a relative path.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Command_Execution_and_Output_Analysis\"><\/span>Command Execution and Output Analysis<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To use this utility, establish an active SSH connection to your server using a terminal application or a client tool like PuTTY. Once logged in, type the command in lowercase letters and press Enter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pwd\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The system will instantly evaluate your current location and return a single line of text displaying the full directory path:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/mybox\/yourlogin\/public_html\/staging\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Common Navigational Scenarios<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Knowing your absolute path is highly beneficial when moving between folders using the <code>cd<\/code> (Change Directory) command:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Logging In:<\/strong> When you first open your SSH terminal session, the server automatically places you inside your personal user home directory. Running <code>pwd<\/code> will show your base path.<\/li>\n\n\n\n<li><strong>Moving Deeper:<\/strong> If you execute <code>cd public_html<\/code>, you move into your web directory. Running <code>pwd<\/code> again will show your path updated with <code>\/public_html<\/code> appended to the end.<\/li>\n\n\n\n<li><strong>Tracking Context:<\/strong> When executing automated bash scripts, installing application dependencies via Composer, or running command-line utilities, executing <code>pwd<\/code> first ensures you are running those actions inside the correct folder workspace.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[54],"manual_kb_tag":[747,1180,6174,6175,6197,6231,6232,6233,6234,6235],"class_list":["post-8991","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-ssh","manual_kb_tag-secure-shell","manual_kb_tag-server-administration","manual_kb_tag-backend-web-development","manual_kb_tag-cloud-systems-engineering","manual_kb_tag-file-system","manual_kb_tag-secure-shell-session","manual_kb_tag-print-working-directory","manual_kb_tag-absolute-path","manual_kb_tag-relative-path","manual_kb_tag-current-working-directory"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8991\/revisions"}],"predecessor-version":[{"id":8995,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/8991\/revisions\/8995"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=8991"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=8991"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=8991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}