4

The skype website offers downloads for linux in 2 versions DEB and RPM. I don't know which one is right for my computer.

AdminBee
  • 22,803
  • Perhaps https://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script or https://unix.stackexchange.com/questions/519773/find-package-os-distribution-manager-for-automation? – Jeff Schaller Aug 23 '21 at 18:07
  • Who installed your system? Do you manage it? – Jeff Schaller Aug 23 '21 at 19:53

3 Answers3

6

If dpkg -l produces a long list of packages, your system uses .deb packages.

If rpm -qa produces a long list of packages, your system uses RPMs.

If neither of these produce a long list of packages, your system another packaging format.

Note that in many cases you’ll need to know your actual distribution, not just what package format it uses. cat /etc/os-release will tell you in most current Linux systems.

Stephen Kitt
  • 434,908
1

If your system uses RPM, you will have a program called rpm installed; if it uses Deb, you will have a program called dpkg installed. Whether a particular program is installed can be found out using the which command.

If you are new to Linux systems, I assume that you do not have a complex set-up, and since you are interested in getting Skype, I further assume that you are running a graphical desktop environment on your system. In that case, simply open a terminal window (the Terminal application if you are using GNOME, Konsole if you are using KDE, or something similar if you are using another desktop environment - usually, opening the main menu and typing/searching for terminal will show you the relevant application(s)), then type one or both of the following commands in the newly opened window:-

which rpm

and/or

which dpkg


If the output shows nothing or no dpkg in ... or no rpm in ... it indicates the one that your system does not use. If the output shows just one path name and/or an alias name on one or more lines without the pattern no xxx ... (e.g., just /usr/bin/rpm), it indicates the one that your system uses.


If both show single-line path name and/or alias name outputs (unlikely but possible), or if both commands show nothing or give a negative response, then your system may be using something different, and you will have to provide more information, such as the output of cat /etc/os-release | grep -E '^NAME=|PRETTY_NAME=' as mentioned in another answer here.

There are other possibilities in general, but going by my assumptions, I don't want to confuse you more than is necessary!

  • 1
    There are systems with both dpkg and rpm installed, so simply checking for their existence isn’t sufficient. – Stephen Kitt Aug 23 '21 at 20:31
  • @StephenKitt: That is why I added a link to your answer. However, I would like to point out (again) my assumptions, based on the simplicity of the question. – Saurav Sengupta Aug 23 '21 at 20:34
  • An answer to one of the questions linked to by Jeff Schaller in a comment above (https://unix.stackexchange.com/questions/519773/find-package-os-distribution-manager-for-automation) uses a similar technique. – Saurav Sengupta Aug 23 '21 at 20:42
  • Yes, and my comment applies to that answer too — some systems have both apt and yum installed. (Incidentally, you missed the last link in that answer, which is relevant to yours.) – Stephen Kitt Aug 23 '21 at 20:58
  • No, I went through the last link, but I felt that adding all that information here would be too much of a digression, though for my own knowledge, I appreciate it very much. – Saurav Sengupta Aug 23 '21 at 21:08
  • which rpm: /usr/bin/rpm; which dpkg: /usr/bin/dpkg; Debian. The answer which said if dpkg -l or rpm -qa return long list of packages, that is what runs your system was a better answer because it's correct, non ambiguous, and easy to understand. It also covers cases where neither is running the system, for example pacman, in which case both are likely to return command not found errors. The original question was actually not right, since it's not rpm or deb, it's simply which package manager is running the os. – Lizardx Aug 23 '21 at 22:15
  • @Lizardx: It creates similar ambiguity in case both or none are installed. You need to know what to use, then. – Saurav Sengupta Aug 24 '21 at 08:00
  • @StephenKitt: I too referred to that question. – Saurav Sengupta Aug 24 '21 at 08:01
  • @Saurav “It creates similar ambiguity in case both or none are installed.” — I respectfully disagree. The ambiguity is the same in case none are installed; but if both are installed, only one will return a long list of packages, and that’s the one that’s actually in use. – Stephen Kitt Aug 24 '21 at 08:15
  • @StephenKitt: I stand corrected, though, (again) going by the simplicity of the OP, I doubt if both are installed. My aim here was to answer the OP, not to create a general how-to, though the latter is certainly of much use but also more complicated. I have also added another answer, asking to consider installing a Snap package. – Saurav Sengupta Aug 24 '21 at 08:29
  • @StephenKitt: I suggested which because, seeing the simplicity of the OP, I doubted whether the added complexity of the other options would be worth it. The which command seems good enough for a beginner, and I would humbly request and advise against a debate on which vs the more recent/'correct' options here. – Saurav Sengupta Aug 24 '21 at 08:34
  • Anyway, I feel that the output of cat /etc/os-release | grep -E '^NAME=|^PRETTY_NAME=' would make things much easier here. – Saurav Sengupta Aug 24 '21 at 08:36
  • OK, we’ll just have to disagree then; I don’t see how command -v dpkg is more complex than which dpkg ;-). – Stephen Kitt Aug 24 '21 at 08:55
1

There is another possibility - use a Snap package. It works on most common distributions, and you don't have to worry about rpm, deb, or whatever, but you may have to install Snap support first. Instructions are here (you may have to scroll down to select your distribution). If you use Ubuntu, snap is already installed, so you just need to install the Skype Snap package. If you have questions, you can ask here. Also, it would make it easier to answer if you provided the output of cat /etc/os-release | grep -E '^NAME=|^PRETTY_NAME='.