Common Commands
Documentation Description
This document compiles commonly used Linux commands in the Klipper system, primarily for:
- Daily operation reference – Quick lookup for high-frequency commands
- Troubleshooting assistance – Locate relevant commands for verification or repair when encountering common issues
- Learning and reference – Serves as a basic command set for Linux and Klipper interaction
Note: This document only includes command listings and brief descriptions, and does not cover specific debugging processes or fault analysis. Use according to specific scenarios.
Device Identification
CAN Device ID Query
Standard Host:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
FLY Host:
python3 ~/klipper/scripts/canbus_query.py can0
USB Device ID Query
ls /dev/serial/by-id/*
Firmware Flashing
STM32 Series (DFU Mode)
- Note: Cannot flash HEX files
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/<firmware file>.bin
Flashing Klipper via Katapult
USB Flashing
Standard Host:
~/klippy-env/bin/python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<Your Board ID>
FLY Host:
python ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/<Your Board ID>
Generic Command (requires device ID):
cd ~/klipper/ && make flash FLASH_DEVICE=<Your Board ID>
CAN Flashing
python3 ~/klipper/lib/canboot/flash_can.py -u <CAN-ID>
CAN Reset to BL
Standard Host:
~/klippy-env/bin/python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Board ID>
FLY Host:
python3 ~/katapult/scripts/flashtool.py -i can0 -r -u <Your Board ID>
RP2040 Series
Flashing Klipper Firmware
cd ~/klipper/ && make flash FLASH_DEVICE=2e8a:0003
Flashing Bootloader
First time flashing requires compiling tools:
cd ~/klipper/ && cd ~/klipper/lib/rp2040_flash/ && make
Execute Flashing:
sudo ~/klipper/lib/rp2040_flash/rp2040_flash ~/<firmware path>/<file name>.uf2
Code Management
Pulling a Specific Branch
Pull the dev-flyos branch of the repository to the /data/klipper directory:
cd && git clone https://cnb.cool/3dmellow/public/klipper -b dev-flyos /data/klipper
Service Management
Klipper Service
Restart Service
sudo systemctl restart klipper
View Live Logs
sudo journalctl -u klipper -f
View Service Status
sudo systemctl status klipper
Moonraker Service
Restart Service
sudo systemctl restart moonraker
View Live Logs
sudo journalctl -u moonraker -f
View Service Status
sudo systemctl status moonraker
KlipperScreen Service
Restart Service
sudo systemctl restart KlipperScreen
View Live Logs
sudo journalctl -u KlipperScreen -f
View Service Status
sudo systemctl status KlipperScreen
Loading...