Part III: Command-Line Printer Control

Command-Line Printer Control

Why click buttons when you can talk to the printer directly over serial? The Ender-3 V3 SE speaks G-code — every command the slicer generates, you can type by hand.

Option A: Raw Serial with picocom

sudo pacman -S picocom
picocom -b 115200 /dev/ender3v3se

You’re now connected directly to the Marlin firmware. Type G-code commands and see raw responses:

Table 1. Essential G-code Commands
Command What It Does

M105

Query current nozzle and bed temperatures

M115

Print firmware version and capabilities

M503

Dump all firmware settings (steps/mm, acceleration, PID values)

G28

Home all axes (X, Y, Z)

G29

Run auto bed leveling (CR Touch)

M104 S210

Set nozzle temperature to 210°C (non-blocking)

M109 S210

Set nozzle temperature to 210°C and wait until reached

M140 S60

Set bed temperature to 60°C (non-blocking)

M190 S60

Set bed temperature to 60°C and wait until reached

G1 X100 Y100 F3000

Move to position X=100 Y=100 at 3000 mm/min

G1 Z10 F300

Raise Z axis to 10 mm

G1 E10 F200

Extrude 10 mm of filament at 200 mm/min

M106 S255

Fan on full (0–255 range)

M107

Fan off

M500

Save settings to EEPROM

M501

Load settings from EEPROM

M18

Disable stepper motors (lets you move axes by hand)

Exit picocom: Ctrl+A then Ctrl+X

If you’re inside tmux, Ctrl+A is likely your tmux prefix and won’t reach picocom. Instead, kill it from another pane:
# Find the PID holding the serial port
lsof /dev/ender3v3se

# Kill it
kill <PID>
G-code commands are case-sensitive — use uppercase (M105, not m105). Lowercase will return Unknown command.

Option B: pronsole (Full CLI Print Control)

pronsole is a dedicated command-line interface for 3D printers — connect, preheat, load G-code, and kick off prints without ever opening a GUI.

yay -S printrun
pronsole.py
The command is pronsole.py, not pronsole. Verify with: pacman -Ql printrun | grep bin

You will see two harmless warnings about dbus and psutil — these are optional dependencies for sleep inhibition and process priority. Ignore them.

Table 2. pronsole Quick Reference
Command What It Does

connect /dev/ender3v3se 115200

Connect to the printer over serial

gettemp

Query current temperatures

bedtemp 60

Set bed temperature

settemp 210

Set nozzle temperature

home

Home all axes (lifts nozzle — use before cleaning bed)

extrude 50

Extrude 50mm of filament (use to test flow)

load /full/path/to/file.gcode

Load a sliced G-code file (no ~ expansion)

print

Start printing the loaded file

monitor

Watch print progress, temps, and ETA in real time

pause

Pause the current print

resume

Resume a paused print

reset

Reset the printer (use to cancel a failed print)

off

Turn off heaters and motors

disconnect

Disconnect from the printer

exit

Quit pronsole

pronsole does not expand ~. Always use the full absolute path when loading G-code files (e.g., /home/evan/3dprints/…​ not ~/3dprints/…​).
There is no abort or cancel command. To stop a bad print: pauseresethome → clean bed → loadprint.

CLI-First Workflow

The full terminal-native workflow — slice in the GUI, then drive everything from the shell:

Daily workflow (CLI-first)
 1. Power on printer
 2. Clean bed with IPA
 3. Load STL into OrcaSlicer (flatpak run com.orcaslicer.OrcaSlicer)
 4. Select profile: Ender-3 V3 SE / 0.4 nozzle / PLA
 5. Adjust nozzle temp for your filament (check spool label)
 6. Click "Slice plate" → "Export G-code" → save to ~/3dprints/
 7. Preheat via picocom:
      picocom -b 115200 /dev/ender3v3se
      M104 S210    (nozzle)
      M140 S60     (bed)
      M105         (check temps)
 8. Kill picocom from another pane:
      lsof /dev/ender3v3se → kill <PID>
 9. Print via pronsole:
      pronsole.py
      connect /dev/ender3v3se 115200
      load /home/<user>/3dprints/<file>.gcode
      print
      monitor
10. Watch first layer — confirm filament is extruding
11. Walk away (monitor command shows progress remotely)
12. Remove print after bed cools to ~30°C
If printing via USB/serial, your computer must stay connected for the entire print duration. If the laptop dies or disconnects, the print stops. For unattended prints, use the MicroSD card method.