Common CLI Commands
Page Contents
Last edited by
s2l1
08/06/2025

General Commands

Shutdown Device: systemctl poweroff

Reboot Device: systemctl reboot

Change Directory: cd

Kill Process: CTRL + c

Show the Files/Directories: ls

Show the Long List for Files/Directories, Includes Hidden: ls -la

Remove File: rm filename

Remove Directory: rm -r ~/directory

Remove File by Directory: rm -rf ~/directory


Docker Commands

Show Containers & Status: docker ps -a

Show Files/Directories in the Docker Container: docker container ls

Docker Info: docker info or docker info | grep "Docker Root Dir:"

Restart Tor: docker restart tor

Show Docker Version: docker -v

Docker Status: systemctl status docker

Make Directory to Mount Docker on USB: sudo mkdir /mnt/usb/docker


Chmod Commands

Makes file executable: sudo chmod +x ~/script.sh


Update Commands

Sync & Upgrade: sudo apt-get update && sudo apt-get upgrade


Drive Commands

Show Attached Drive Info: lsblk

Show Drive Space & Mounted Drive Info: df -h

Format to ext4: sudo mkfs.ext4 /dev/sda1

Create USB Mount Directory: sudo mkdir /mnt/usb

Mount All Drives: sudo mount -a


Systemctl Commands

Restart Docker: systemctl restart docker

Stop Docker: systemctl stop docker

Start Docker: systemctl start docker

Disable at System Start-Up: systemctl disable docker

Enable at System Start-Up: systemctl enable docker

List Active Service Units: systemctl list-units --type=service

Reload Daemon: systemctl daemon-reload


Git Commands

Clone Git Repository: git clone https://repo.git

Clone Specific Branch of Repository: git clone -b development https://repo.git

Switches to Development Branch: git checkout development


Nano Text Editor and Explorer Commands

Launch: nano or nano filename

Use nano to edit text in an existing file, create a file, and explore your filesystem. Use CTRL+R + CTRL+T to bring you to the home directory. From there you can explore and edit the files & directories of the system.

To go back a directory CTRL+O then CTRL+T


Example Commands

Remove RoninDojo Repository, Clone Again:

rm -r ~/RoninDojo

git clone https://code.samourai.io/ronindojo/RoninDojo.git

Create Script, Make Executable, and Launch:

nano script1.sh

sudo chmod +x script1.sh

./script1.sh


Dojo

Commands Syntax

./dojo.sh <command> <module> <options>     To use these commands you must be in the correct directory!

Change Directory: cd dojo/docker/my-dojo


Dojo Commands

Display Help Message: ./dojo.sh help

Use bitcoin-cli Console to Interact with bitcoind RPC API: ./dojo.sh bitcoin-cli

Delete Dangling Docker Images: ./dojo.sh clean

Install Dojo Manually: ./dojo.sh install

Display the Tor Onion Addresses for Dojo: ./dojo.sh onion

Restart your Dojo: ./dojo.sh restart

Start your Dojo: ./dojo.sh start

Stop your Dojo: ./dojo.sh stop


Dojo Logs Commands

All Container Logs: ./dojo.sh logs     To use these commands you must be in the correct directory!

Specific Container Logs: ./dojo.sh logs node

For Error Logs: ./dojo.sh logs node -n 500 | egrep "ERROR|error"

This shows the node container errors for up to 500 lines. Use CTRL + c to exit anytime.


Other Commands

Blockchain Info: ./dojo.sh bitcoin-cli getblockchaininfo

Display Dojo Version: ./dojo.sh version

Network Info: ./dojo.sh bitcoin-cli getnetworkinfo or sudo ./dojo.sh bitcoin-cli --getinfo

Uninstall Dojo: ./dojo.sh uninstall     Be careful, this will also remove blockchain data!

Upgrade Dojo: ./dojo.sh upgrade


Additional Info

Check out the Troubleshooting page for more info.

Need help? Try out our Support Service.

Join the RoninDojo Chatroom and engage the community.