Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:36:42+00:00 2026-05-25T09:36:42+00:00

I’m adapting a prepare script for CentOS that was previously written for Ubuntu. In

  • 0

I’m adapting a prepare script for CentOS that was previously written for Ubuntu.

In the Ubuntu script, the command dpkg -s {some program} is called frequently. For example, one such command is dpkg -s snmpd to check if the SNMP Daemon is installed.

What is the equivalent in CentOS? I know that RPM is the package manager. The command rpm -q is similar, but it looks for packages and not programs.

For example, running rpm -q snmpd returns:

package snmpd is not installed

My question is, what is the CentOS equivalent of the Ubuntu command dpkg -s ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:36:43+00:00Added an answer on May 25, 2026 at 9:36 am

    dpkg -s does take a package name, not a file or program, as an argument. (In many cases, a program will have the same name as the package that provides it.)

    For example, on my Ubuntu system, dpkg -s gcc prints:

    Package: gcc
    Status: install ok installed
    Priority: optional
    Section: devel
    Installed-Size: 64
    Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
    Architecture: i386
    Source: gcc-defaults (1.98ubuntu3)
    Version: 4:4.5.2-1ubuntu3
    Provides: c-compiler
    Depends: cpp (>= 4:4.5.2-1ubuntu3), gcc-4.5 (>= 4.5.2-1~)
    Recommends: libc6-dev | libc-dev
    Suggests: gcc-multilib, make, manpages-dev, autoconf, automake1.9, libtool, flex, bison, gdb, gcc-doc
    Conflicts: gcc-doc (<< 1:2.95.3)
    Description: The GNU C compiler
     This is the GNU C compiler, a fairly portable optimizing compiler for C.
      .
       This is a dependency package providing the default GNU C compiler.
       Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
    

    On a CentOS system, rpm -q gcc prints:

    gcc-4.1.2-50.el5
    

    It doesn’t print as much information, but if all you’re doing is checking whether a package is installed, it should be ok. If you need more information or other options, man rpm; other queries are available.

    If rpm -q snmpd prints package snmpd is not installed, that’s probably just the information you need.

    Both dpkg -s and rpm -q set the exit status accordingly, reporting failure if the package isn’t installed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.