Common Commands
Document Description
This document organizes commonly used Linux commands in the Klipper system, primarily for:
- Daily Operation Reference – Provides quick lookup of high-frequency commands
- Troubleshooting Assistance – Helps locate related commands for verification or repair when encountering common issues
- Learning and Reminders – Serves as a basic command set for Linux and Klipper interaction
Note: This document only includes command listings and brief explanations, without covering specific debugging processes or fault analysis. Use according to specific scenarios in practice.
Device Identification
Query CAN Device ID
General Host:
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
FLY Host:
python3 ~/klipper/scripts/canbus_query.py can0
Query USB Device ID
ls /dev/serial/by-id/*
Firmware Flashing
STM32 Series (DFU Mode)
- Note that HEX files cannot be flashed
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D ~/<firmware file>.bin
Flash Klipper via Katapult
USB Flashing
General 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>
General Command (requires device ID):
cd ~/klipper/ && make flash FLASH_DEVICE=<your board ID>
CAN Flashing
Version Notes
Select the correct command based on your system version:
-
FlyOS-FAST 1.3.8 and above or System with Klipper updated after April 9, 2026:
python3 ~/klipper/lib/katapult/flashtool.py -u <CAN-ID> -
Old version systems (Before FAST 1.3.8 or Klipper not updated before April 9, 2026):
python3 ~/klipper/lib/canboot/flash_can.py -u <CAN-ID>
CAN Reset to BL
General 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
Flash Klipper Firmware
cd ~/klipper/ && make flash FLASH_DEVICE=2e8a:0003
Flash Bootloader
First flash requires compiling tools:
cd ~/klipper/ && cd ~/klipper/lib/rp2040_flash/ && make
Execute flashing:
sudo ~/klipper/lib/rp2040_flash/rp2040_flash ~/<firmware path>/<filename>.uf2
Code Management
Pull 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 Real-time Logs
sudo journalctl -u klipper -f
View Service Status
sudo systemctl status klipper
Moonraker Service
Restart Service
sudo systemctl restart moonraker
View Real-time Logs
sudo journalctl -u moonraker -f
View Service Status
sudo systemctl status moonraker
KlipperScreen Service
Restart Service
sudo systemctl restart KlipperScreen
View Real-time Logs
sudo journalctl -u KlipperScreen -f
View Service Status
sudo systemctl status KlipperScreen
Loading...