Close Menu
Global News HQ
    What's Hot

    XRP Produces Successful $3 Support Retest – But What Next?

    July 27, 2025

    Private equity has ruined so many more businesses than you realize

    July 26, 2025

    Eco-Friendly Kitchen Swaps That Save Waste—and Might Save You Money

    July 26, 2025
    Recent Posts
    • XRP Produces Successful $3 Support Retest – But What Next?
    • Private equity has ruined so many more businesses than you realize
    • Eco-Friendly Kitchen Swaps That Save Waste—and Might Save You Money
    • A Shopper’s Hairstylist Noticed ‘Tons of New Hair Growing’ Thanks to This Strand-Thickening $17 Serum
    • Master the 3-2-1 Rule on LinkedIn to Quickly Build Your Personal Brand
    Facebook X (Twitter) Instagram YouTube TikTok
    Trending
    • XRP Produces Successful $3 Support Retest – But What Next?
    • Private equity has ruined so many more businesses than you realize
    • Eco-Friendly Kitchen Swaps That Save Waste—and Might Save You Money
    • A Shopper’s Hairstylist Noticed ‘Tons of New Hair Growing’ Thanks to This Strand-Thickening $17 Serum
    • Master the 3-2-1 Rule on LinkedIn to Quickly Build Your Personal Brand
    • 4 Things I Tossed During My Last Three Moves That I Wish I’d Gotten Rid of Sooner
    • Onboard Etihad’s A321LR delivery flight: Behind the scenes from Airbus to Abu Dhabi – The Points Guy
    • The coming Bitcoin treasury bubble could rival the dot-com era with $11T of capital chasing BTC
    Global News HQ
    • Technology & Gadgets
    • Travel & Tourism (Luxury)
    • Health & Wellness (Specialized)
    • Home Improvement & Remodeling
    • Luxury Goods & Services
    • Home
    • Finance & Investment
    • Insurance
    • Legal
    • Real Estate
    • More
      • Cryptocurrency & Blockchain
      • E-commerce & Retail
      • Business & Entrepreneurship
      • Automotive (Car Deals & Maintenance)
    Global News HQ
    Home - Technology & Gadgets - How to troubleshoot Linux app startup issues with the journalctl command
    Technology & Gadgets

    How to troubleshoot Linux app startup issues with the journalctl command

    Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
    How to troubleshoot Linux app startup issues with the journalctl command
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Nodar Chernishev/Getty Images

    Something rarely goes wrong with Linux, but that doesn’t mean the operating system is immune to problems. Every once in a while, I’ll install a new service or app and then go to start it with the command:

    sudo systemctl start NAME

    Where NAME is the name of the app or service.

    Also: The first 5 Linux commands every new user should learn

    There have been instances where the service refuses to start or run properly. When that happens, where do you turn? You could always check log files (usually the best place to start) or turn to another command that is a companion to systemctl. That command is journalctl. 

    The journalctl command queries the systemd journal and lists the contents of a journal that could include insights into why a particular app or service isn’t running properly. Often, when you attempt to start a service with systemctl, if the service doesn’t start properly (or at all), you’ll see a suggestion in the output to use the journalctl command to find out what has happened.

    Let me show you how to use this command, so you don’t have to be in the dark as to why things aren’t going as planned.

    How to use journalctl

    What you’ll need: The only thing you’ll need for this task is a Linux distribution that uses systemd, which is most of the major distributions.

    The first thing you should try is running journalctl without any options, which is simple:

    Show more

    journalctl

    What you will see is the entire output of the systemd journal. From that output, you might find information to help you troubleshoot your problem. 

    When I ran the command, there were only 41 lines of output. I’ve seen instances where there were hundreds of lines in the output, which made using the command without arguments or options a bit unhelpful.

    Also: 10 Linux apps I install on every new machine (and why you should, too)

    Fortunately, you can filter out a lot of that noise.

    For instance, SSH is having problems starting. To troubleshoot this issue, you could run the command:

    Show more

    systemctl -u ssh

    In this case, -u stands for unit, or a specific systemd unit (think “service”).

    Also: How to create system restore points on Linux with Timeshift – and why you should

    The output of the above command might look something like this:

    Jan 12 09:55:42 pop-os systemd[1]: Starting OpenBSD Secure Shell server…
    Jan 12 09:55:42 pop-os sshd[3424]: Server listening on 0.0.0.0 port 22.
    Jan 12 09:55:42 pop-os sshd[3424]: Server listening on :: port 22.
    Jan 12 09:55:42 pop-os systemd[1]: Started OpenBSD Secure Shell server.
    Jan 15 09:39:26 pop-os sshd[659190]: Invalid user jackwallen from 192.168.1.77 port 55040
    Jan 15 09:39:29 pop-os sshd[659190]: pam_unix(sshd:auth): check pass; user unknown
    Jan 15 09:39:29 pop-os sshd[659190]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.77
    Jan 15 09:39:31 pop-os sshd[659190]: Failed password for invalid user jackwallen from 192.168.1.77 port 55040 ssh2
    Jan 15 09:39:33 pop-os sshd[659190]: Connection closed by invalid user jackwallen 192.168.1.77 port 55040 [preauth]
    Jan 15 09:39:39 pop-os sshd[659232]: Accepted password for jack from 192.168.1.77 port 55049 ssh2
    Jan 15 09:39:39 pop-os sshd[659232]: pam_unix(sshd:session): session opened for user jack(uid=1000) by (uid=0)

    As you can see, in my case, SSH is running as expected, but there was a failed attempt at logging in (which was because I forgot to add a valid username when logging in from my iMac).

    There’s an even better way to troubleshoot a service with journalctl. Let’s say SSH is running but having trouble accepting connections (or just about any other issue that could happen). You can “tail” the output (which prints out real-time information as it happens), like so:

    Show more

    journaltcl -xefu ssh

    This command will not only tell you the startup and running status of the service but will list the most recent entries logged to the journal for that service. To close, use the Ctrl+c keyboard shortcut. For those who want to know, here’s an explanation of the options:

    • x – add an explanation to the log lines from the message catalog
    • e – immediately jump to the end of the journal inside the implied pager tool
    • f – follow (continuously print new entries as they are logged)
    • u – unit (as explained above)

    It’s also possible to view a specific time range with journalctl. Say you want to view only entries logged starting Jan. 20 at 10:00 AM. The command would be:

    Show more

    journalctl –since “2025-01-20 10:00:00”

    You would see every entry logged from 10:00 AM to the current time.

    Also: How to keep Linux optimized (and save time) with Stacer

    You could make that range even more specific. Say you want to view entries logged from 10:00 AM to 10:10 AM. The command would be:

    journalctl –since “2025-01-20 10:00:00” –until “2025-01-20 10:05:00”

    And that, my friends, is how you can use journalctl to troubleshoot app startup issues on Linux.





    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email
    Previous Article3 Massive Risks for Intel Stock | The Motley Fool
    Next Article ‘I won the Pulitzer Prize and I’m busking on a corner’: 3 top artists on the uncertain future of political cartooning

    Related Posts

    BLUR Basecamp 75+ keyboard with potato-mode façade announced — the appeal is literally difficult to see

    July 26, 2025

    The best gaming speakers of 2025: Expert tested from SteelSeries and more

    July 26, 2025

    After BlackSuit is taken down, new ransomware group Chaos emerges

    July 26, 2025

    Tea App Breach Exposes 72,000 Selfies, ID Photos and Other User Images

    July 26, 2025
    Leave A Reply Cancel Reply

    ads
    Don't Miss
    Cryptocurrency & Blockchain
    3 Mins Read

    XRP Produces Successful $3 Support Retest – But What Next?

    Renowned market expert with X username CasiTrades has shared an interestingly bullish insight on the…

    Private equity has ruined so many more businesses than you realize

    July 26, 2025

    Eco-Friendly Kitchen Swaps That Save Waste—and Might Save You Money

    July 26, 2025

    A Shopper’s Hairstylist Noticed ‘Tons of New Hair Growing’ Thanks to This Strand-Thickening $17 Serum

    July 26, 2025
    Top
    Cryptocurrency & Blockchain
    3 Mins Read

    XRP Produces Successful $3 Support Retest – But What Next?

    Renowned market expert with X username CasiTrades has shared an interestingly bullish insight on the…

    Private equity has ruined so many more businesses than you realize

    July 26, 2025

    Eco-Friendly Kitchen Swaps That Save Waste—and Might Save You Money

    July 26, 2025
    Our Picks
    Cryptocurrency & Blockchain
    3 Mins Read

    XRP Produces Successful $3 Support Retest – But What Next?

    Renowned market expert with X username CasiTrades has shared an interestingly bullish insight on the…

    Business & Entrepreneurship
    1 Min Read

    Private equity has ruined so many more businesses than you realize

    On today’s episode, hosts Josh Christensen and Yaz Gagne are joined by journalist and author…

    Pages
    • About Us
    • Contact Us
    • Disclaimer
    • Homepage
    • Privacy Policy
    Facebook X (Twitter) Instagram YouTube TikTok
    • Home
    © 2025 Global News HQ .

    Type above and press Enter to search. Press Esc to cancel.

    Go to mobile version