Cups 維護筆記

November 30, 2025 17hotness 0likes 0comments

Fixing CUPS Print Server Issue on Ubuntu 24.04

Date: 2025-11-30 12:42 Tags: #Linux #cups #printserver

Table of Contents

  • What happened
  • How I fixed it
  • Prerequisites
  • Step-by-step guide

    What Happened

  • I was running CUPS 2.4.7 on Ubuntu 24.04.
  • The client suddenly couldn’t print anything.
  • After checking the server, I found that CUPS had shut down unexpectedly.

    How I Fixed It

  • Logged into Ubuntu
  • Checked the CUPS service status
  • Restarted the required services
  • Tested printing afterward to confirm everything was working again

    Prerequisites

  • A keyboard
  • A monitor
  • Your Ubuntu user account and password

    Getting Started

    If you forgot your root password

    You can reset it through GRUB.

     1. edit 'ro' to 'rw'
     rw init=/bin/bash
     
     1. press Ctrl + X
     1. press Enter to enter root bash
     
     ls /home \# check your username
     
     passwd {user}
     
     exec /sbin/init

    Check CUPS Status

    Use these commands to find the problem:

    systemctl status cups
     
    sudo cupsd -t \# display error information 
    sudo cat /var/log/cups/error_log \# check cups log
     
    ## `TriggeredBy: cups.socket` and `Dependency failed`
     
    sudo systemctl stop cups.service cups.socket cups.path
    sudo systemctl start cups.socket
    sudo systemctl start cups.service
    sudo systemctl status cups

小四

喜欢摄影 和IT

Comments