Meterpreter File System Commands Cheatsheet

Hey Friends!

Did you know that meterpreter is known as Hacker’s Swiss Army Knife!!

Well! Now you do.

Meterpreter, a highly developed payload that can be extended dynamically, is known to be Hacker’s Swiss Army Knife. It uses reflective DLL injection technique to further compromise the target after attack. Meterpreter is known to influence the functionality of Metasploit framework. It can help in doing a lot many things. Some of these include covering tracks after the attack, accessing operating system, and dumping hashes.

This article discusses meterpreter’s Stdapi File System Commands. There are 21 commands including cat, cd, pwd, and checksum. Figure 1 summarises them:

Let’s start discussing them.


It is the very first command in the group of Stdapi File System Commands. It reads the contents of a file to the screen. In other words, cat displays a file’s contents. cat command in meterpreter is same as cat command used in Unix/Linux systems. 

The syntax of cat in meterpreter is as follows:

cd and pwd

Though cd and pwd commands are two separate commands, they are usually used together. cd stands for change directory and pwd stands for print working directory. You use pwd command to check the directory you are working in. You can change this directory using cd command. By default, current working directory is the one where the connection was established.

The syntaxes of pwd and cd commands in meterpreter are as follows:

cd <path of the folder to change to>


This command retrieves the checksum of a file. The syntax of checksum command is as follows:


This command copies the content of source to destination. The syntax of cp command is as follows:



This command lists files. It is an alias for the ls command. It provides crucial details related to any file or directories such as File Permissions, Size of File, Last modified date and file Name & Type. The syntax of dir command is as follows:



This command downloads remote files and directories from remote location to the local machine. The syntax of download command is as follows:


This command edits a file. The syntax of edit command is as follows:

When you press the Enter key, the screen displayed is as shown in the below image:

After editing the file, type :q! to save the changes and exit, as shown in the below image


This command prints local working directory. The syntax of getlwd command is as follows:



This command prints working directory. The syntax of getwd command is as follows:


This command changes local working directory. The syntax of lcd command is as follows:

You can see that local working directory changes to /root/Desktop


This command lists local files. The syntax of lls command is as follows:


This command prints local working status. It is same as the getlwd command. The syntax of lpwd command is as follows:


This command lists files. The syntax of ls command is as follows:



This command makes directory. The syntax of mkdir command is as follows:



This command moves source to destination.  The syntax of mv command is as follows:

You can see the moved contents using cat command.


This command prints working directory. The syntax of pwd command is as follows:


This command deletes the specified file. The syntax of rm file is as follows:

You can see the list of files before and after using rm command.


This command removes directory. The syntax of rmdir command is as follows:


This command search for files. The syntax of search command is as follows:


This command list all mount points/logical drives. The syntax of show_mount command is as follows:


This command uploads a file or directory. The syntax of upload command is as follows:

You can see the uploaded file, as shown in the below image:

Author: Deepti Sharma is an information security enthusiast and a technical content writer. Contact Here

2 Comments Meterpreter File System Commands Cheatsheet

Leave a Reply

Your email address will not be published. Required fields are marked *