{"id":863,"date":"2025-12-28T15:21:38","date_gmt":"2025-12-28T14:21:38","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=863"},"modified":"2026-02-06T12:15:09","modified_gmt":"2026-02-06T11:15:09","slug":"ssh-commands-overview","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/","title":{"rendered":"SSH commands &#8211; overview"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Below you will find a summary of the most useful SSH commands.<\/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-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#wget\" >wget<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#uname\" >uname<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#touch\" >touch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#tar\" >tar<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#tail\" >tail<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#rmdir\" >rmdir<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#rm\" >rm<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#pwd\" >pwd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#mv\" >mv<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#passwd\" >passwd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#mkdir\" >mkdir<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#ls\" >ls<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#man\" >man<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#history\" >history<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#head\" >head<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#find\" >find<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#grep\" >grep<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#diff\" >diff<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#cd\" >cd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#cp\" >cp<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/ssh-commands-overview\/#cat\" >cat<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"wget\"><\/span>wget<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The wget command is primarily used to download files directly to the server from the SSH console. This is especially useful when you want to download a package with a script to install.<\/p>\n\n\n\n<\/div>\n\n<div id=\"mybox-1397334046\" 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\">For example, this command has such construct<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/domain.com\/filename.zip<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"uname\"><\/span>uname<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The uname command, short for Unix Name, will display detailed information about the Linux system, such as machine name, operating system, kernel, and so on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You have to take into account that in the case of hosting services, the resulting information is often limited from above.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"touch\"><\/span>touch<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The touch command allows you to create a new empty file on the Linux command line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, type touch \/yourdomain.com\/public_html\/page.html to create an HTML file named page in the yourdomain.com domain&#8217;s home directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"tar\"><\/span>tar<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">tar is a tool used to archive and extract archive files in this format.<br>Archive files generated with the help of this application, in the case of compression of a directory containing other directories and files, the directory tree, which allows it to be restored after unpacking.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -archive file options<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Options:<\/strong><br>-c creates a new archive<br>-x will unzip the file<br>-t will display the contents of the archive file<br>-z compresses the archive using the gzip program<br>-r will attach files to an already existing archive<br>-f will indicate the file where the archive is to be saved<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Examples of use:<\/strong><br>To create an archive file named myarchive.tgz containing all the files and subdirectories in the \/yourdomain.com directory, type:<br>tar \u2013c \u2013z -f myarchive.tgz \/yourdomain.com<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Commands for archiving files:<\/strong><br>To extract the compressed archive named myarchive.tgz to the current directory, type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -x -z -f myarchive.tgz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To attach the textfile.txt file to an existing, uncompressed archive named myarchive.tar, type:<br>tar -r -f mojearchiwum.tar dodatkowy.txt<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"tail\"><\/span>tail<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The tail command is somewhat similar to the head command, but instead of showing the first lines, tail will show us the last ten lines of the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tail -n notes.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command is often used to extract recent references from access logs or error logs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"rmdir\"><\/span>rmdir<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to delete a directory, use the rmdir command.<br>Note that rmdir only allows you to delete empty directories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"rm\"><\/span>rm<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The rm command is used to delete directories and their contents. If you want to delete only the directory \u2013 as an alternative to rmdir \u2013 use rm -r where -r means recursive deletion, so it also applies to the contents of the directory.<\/p>\n\n\n\n<div class=\"wp-block-onethird-callout-box onethird-callout-wrap\"><div class=\"onethird-callout onethird-callout--warn\" style=\"--ot-bg:#FFEAE9;--ot-border:#F8D0D0;--ot-text:#6F7C88;--ot-title:#384048;--ot-body:#6F7C88;--ot-icon:#384048;border-radius:6px;padding:16px\"><div class=\"onethird-callout__head\"><span class=\"onethird-callout__icon\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"none\" stroke=\"#384048\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 3 2.5 20.5h19L12 3z\"><\/path><path fill=\"none\" stroke=\"#384048\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v5\"><\/path><path fill=\"none\" stroke=\"#384048\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 17h.01\"><\/path><\/svg><\/span><div class=\"onethird-callout__title\">Note<\/div><\/div><div class=\"onethird-callout__body\">Be very careful with this command and double-check which directory you are in.<\/div><\/div><div class=\"onethird-callout__separator\" style=\"height:18px\" aria-hidden=\"true\"><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"pwd\"><\/span>pwd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the pwd command to find out what the path to the current directory (folder) you are in. The command will return an absolute (full) path, which is basically the path of all directories starting with a forward slash (\/). An example of an absolute path is \/home\/mybox\/yourlogin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"mv\"><\/span>mv<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The primary use of the mv command is to move files, although it can also be used to rename files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The arguments in mv are similar to the cp command. You need to enter the mv, file name, and destination directory. For example: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mv file.txt \/destination-directory.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To rename files, the Linux command is <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mv oldname.txt newname.txt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"passwd\"><\/span>passwd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">passwd \u2013 change the user&#8217;s password. If you do not specify the name of the user for whom the password is being changed, the password of the user from whose account the command was issued will be changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>passwd username<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Examples of use:<br>Change password for login-mybox<br>passwd login-mybox account<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"mkdir\"><\/span>mkdir<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the mkdir command to create a new directory \u2013 if you type <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir newdirectory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">it will create a directory named newdirectory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are also additional mkdir commands:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To create a new directory inside another directory, use this command mkdir directory-1\/directory-2<br>use the p (parents) option to create a directory between two existing directories. For example, <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p directory-1\/2020\/directory-2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">will create a new file &#8220;2022&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ls\"><\/span>ls<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The ls command is used to browse the contents of the directory. By default, this command will display the contents of the current working directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to see the contents of other directories, type ls and then the path to the directory. For example, type ls mydomain.com to view the contents of the mydomain.coml directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are variants that you can use with the ls command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ls -R will display all files that are also in subdirectories<br>ls -a will show hidden files<br>ls -al will display a list of files and directories with details such as permissions, size, owner, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"man\"><\/span>man<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Have doubts about the functionality of some Linux commands? Don&#8217;t worry, you can easily learn how to use them directly from the Linux shell using the man command. In this case, Man is an abbreviation for manual, i.e. a user manual.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, typing man tail will show the manual for the tail command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"history\"><\/span>history<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you use Linux for a period of time, you will quickly notice that you are giving a lot of commands every day.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Issuing the history command is especially useful if you want to review commands that have been used before.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"head\"><\/span>head<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The head command is used to display the first lines of any text file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, it shows the first ten lines, but you can change this number to your liking.<br>For example, if you want to display only the first five lines of a notes.txt file, issue the command <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>head -n 5 notes.txt.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"find\"><\/span>find<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using the find command searches for files and directories within the directory you&#8217;re currently in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the command find ~\/-name notes.txt will search for a file named notes.txt in the home directory and its subdirectories.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Other variants of using find are:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find files in the current directory use, <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>find .-name notes.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To search directories use, <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>find \/-type d -name notes.txt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"grep\"><\/span>grep<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Linux command that is undoubtedly helpful in everyday use is grep. It allows you to search all the text in a given file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To illustrate, the grep login command will notes.txt search for the word login in the notes.txt file.<br>Lines that contain the search word will be displayed in their entirety.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"diff\"><\/span>diff<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Command is an abbreviation of the word difference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">diff compares the contents of two files line by line. After analyzing the files, it lists those lines that do not differ from each other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Developers often use this command when they need to make changes to a program instead of rewriting all the source code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The simplest form of this command is <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>diff file1.txt file2.txt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"cd\"><\/span>cd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To navigate through files and directories in Linux, use the cd command. It requires either the full path or the directory name, depending on which directory you are currently in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s say you&#8217;re in \/home\/mybox\/yourlogin\/domain.com\/public_html and you want to go to wp-content, which is a subdirectory of public_html. To do this, simply type the following command: cd wp-content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another scenario is if you want to go to a completely new directory, such as \/home\/mybox\/yourlogin\/anotherdomain.com\/public_html. In this case, you need to type cd and then the absolute path to the directory: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/mybox\/yourlogin\/anotherdomain.com\/public_html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or if you are operating within the same home directory, you can also go a level higher by using two dots i.e . <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd .. \/anotherdomain.com\/public_html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There are a few shortcuts to help you navigate quickly:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">cd.. (with two dots) to move up one directory<br>CD to go directly to the home folder<br>cd- (with hyphen) to go to the previous directory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Linux shell is case-sensitive. So, you need to type the directory name exactly as it is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"cp\"><\/span>cp<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the cp command to copy files from the current directory to another directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the command <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp photo.jpg \/photos <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">will create a copy of the photo.jpg file (from the current directory) to the photo directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"cat\"><\/span>cat<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">cat (short for concatenate) is one of the most commonly used commands in Linux. It is used to list the contents of a file on standard output (stdout).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To run this command, type cat, followed by the file name and its extension. For example: cat file.txt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are other ways to use the cat command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>catfilename > creates a new file\n\ncat file-1 file-2>file-3 combines two files (1 and 2) and saves their output in a new file (3)\n\ncat filename | tr a-z A-Z >file.txt to convert the file to uppercase or lowercase<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you don&#8217;t already have an active SSH access option, click <a href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-activate-my-ssh-account\/\" data-type=\"link\" data-id=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-do-i-activate-my-ssh-account\/\">HERE<\/a> for a guide.<\/p>\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":[25,54],"manual_kb_tag":[1504,1520,1536,1505,1521,1537,1506,1522,1538,1507,1523,1539,1508,1524,1540,1509,1525,1541,1510,1526,1542,1511,1527,242,1512,1528,518,1513,1529,584,1514,1530,772,1515,1531,975,1516,1532,1326,1517,1533,1354,1518,1534,1495,1519,1535],"class_list":["post-863","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-hosting","manualknowledgebasecat-ssh","manual_kb_tag-linux-commands","manual_kb_tag-diff","manual_kb_tag-file-archiving","manual_kb_tag-shell-commands","manual_kb_tag-archive-management","manual_kb_tag-install-scripts","manual_kb_tag-terminal-tutorial","manual_kb_tag-archive-extraction","manual_kb_tag-package-installation","manual_kb_tag-common-linux-commands","manual_kb_tag-directory-management","manual_kb_tag-system-information","manual_kb_tag-basic-linux-commands","manual_kb_tag-download-files","manual_kb_tag-gzip-compression","manual_kb_tag-wget","manual_kb_tag-create-files","manual_kb_tag-tar-archive","manual_kb_tag-uname","manual_kb_tag-remove-files","manual_kb_tag-wget-download","manual_kb_tag-touch","manual_kb_tag-move-files","manual_kb_tag-mybox","manual_kb_tag-passwd","manual_kb_tag-copy-files","manual_kb_tag-public_html","manual_kb_tag-mkdir","manual_kb_tag-text-processing","manual_kb_tag-subdirectories","manual_kb_tag-rmdir","manual_kb_tag-log-monitoring","manual_kb_tag-domain","manual_kb_tag-history","manual_kb_tag-search-files","manual_kb_tag-file-management","manual_kb_tag-tail","manual_kb_tag-compare-files","manual_kb_tag-command-line","manual_kb_tag-head","manual_kb_tag-command-reference","manual_kb_tag-access-logs","manual_kb_tag-find","manual_kb_tag-user-management","manual_kb_tag-mkdir-command","manual_kb_tag-grep","manual_kb_tag-password-management"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/863","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\/863\/revisions"}],"predecessor-version":[{"id":4750,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/863\/revisions\/4750"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=863"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=863"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}