SSH commands are helpful to make changes to your server without logging in to WHM or cPanel interface. Below is a list of basic SSH commands you can use after connecting to SSH via Windows or connecting to SSH via Mac.
|Note: SSH connections are only available in Vodien Virtual Private Servers and Dedicated Servers .
SSH Basic Commands
|This command allows you to go to a specific directory. Replace the word directory with the file path you want to access.
|Generates the list of files in the current directory.
|This command brings you one directory up from the current directory.
|This command brings you to the home directory.
|Creates a file and opens it if the indicated file name exists. Replace filename.extension with the file name you want to create or open.
|Creates a directory or subdirectory. Replace the word newdirectory with the folder name you want to create.
|This stands for Print Working Directory. This command gives you the directory name you are currently in.
|Provides the version of the PHP installed on the server.
|cp [source] [newdirectory]
|The cp command copies the specified file/s [source] to the destination directory [newdirectory]. If the source and destination are both files, the destination file copies the contents of the source file. Replace [source] and [newdirectory] with the file name that you want to copy and where you want to copy the file/s.
|cp php.info filename.extension php.ini /destination/directory
|This command copies the set of files to the specified directory. Replace the information in bold with the name of the files that you want to copy and specify the name of the directory where you want to copy the file.
|cp -R [source] [destination]
|Adding the –R flag to the cp command allows you to copy a folder. Replace [source] and [destination] with the folder name that you want to copy and where you want to copy the folder.
|Displays current and total memory usage in megabytes.
|mv filename.php /directory/destination
|This moves the file to the specified directory. Replace filename.php with the name of the file that you want to move and specify the file path where you want to move it.
|mv oldfilename.php newfilename.php
|This renames a file with the specified new file name. If the new file name already exists, this action overwrites the contents of the file. Replace oldfilename.php and newfilename.php with the actual name of the file you want to rename.
(Visited 353 times, 1 visits today)