Linux list all applications

How to get the list of all application installed which has GUI?

I want a list of all installed application which have a GUI. To be clear, At least all the applications that are listed in Show Applications. I tried several commands like apt list —installed , dpkg -l , find ‘*.desktop’ to get the list of all installed application which all ended up missing some applications (like Android Studio, b1freearchiver, pyCharm, etc.) Wouldn’t there be a way to find the folder or file that is used by the Show Applications menu to get all the applications listed in it. I’m running Ubuntu 18.04 desktop.

What would you search for specifically? Packages that have some type of display as a dependency? Or just try searching for all .desktop files?

I’m searching for installed application name. i thought all application would have .desktop so i used find ‘/usr/share/applications/’ -type f -iname ‘*.desktop’ to search for application

It seems that gui programs mostly have .desktop files, terminal programs (like the coreutils) don’t usually bother. If searching for those files worked, I might as well post it as an answer

3 Answers 3

Try searching for all the .desktop files, Gnome’s Developer website calls them the «registered set of applications that users can run» and they’re almost always GUI programs.

This answer (How can I find *.desktop files?) says you could just search everywhere for .desktop files with

Or they’re probably only in /usr/share/applications/ and ~/.local/share/applications so just looking in those should be sufficient:

find /usr/share/applications ~/.local/share/applications -name '*.desktop' 

If you specifically want to exclude terminal programs (even if they have a terminal GUI like htop), you could append these commands to a search above:

. -print0 |xargs -0 grep -i -l "Terminal=False" 

almost always isn’t a very good criteria. Python has .desktop file, byobu does too. These aren’t GUI programs, and in fact command line apps may state Terminal=True in . desktop file to open default terminal. A .desktop file != GUI app

@SergiyKolodyazhnyy a modified search to avoid «Terminal=True» files would be find / -name ‘*.desktop’ -print0 |xargs -0 grep -i -l «Terminal=True» but that would exclude matching htop, Midnight Commander, and a few others that have «terminal» GUI’s. But a «good» desktop program should really follow the freedesktop standaards & «register» a .desktop file, shouldn’t they?

I agree, they should, but that doesn’t mean they necessarily will, especially anything installed from non-standard repository.

As compliment to the @Xen2050 answer you can determine exact package names of the deb-packages (so they are known to APT) having *.desktop files with this one-liner:

dpkg --search '*.desktop' | awk '' | sed "s/://" | sort --unique 
  • dpkg —search ‘*.desktop’ will search for packages having *.desktop files;
  • | is redirect from output of previous command to the input of next command;
  • awk » will print first column of search result (usually in form plank: /usr/share/applications/plank.desktop — so you will get plank: );
  • sed «s/://» will remove unnecessary : from package name (you will get plank here);
  • sort —unique will sort the results and remove duplicates from them.
Читайте также:  Arm linux androideabi gcc error

On my Ubuntu 16.04.5 LTS it returns about 347 unique package names.

If you have installed some software to the home folder — then you can use command below

find ~/.local/share/applications/ '*.desktop' 

to find their *.desktop files.

Usually many applications were installed by APT. If you have installed software with Snap, AppImage, Ubuntu Make, FlatPak, compiled them from source code — then you should find them manually 🙂

Generally, that’s difficult to determine. The other answers aren’t addressing that command line apps also may have .desktop files or GUI apps may not provide a . desktop file. Besides there’s no guarantee an app referenced in the .desktop file still exists on the system( you’d have to run it to know or check Exec= line for existing path). Thus it’s a poor criteria.

What can be done, however is ask a better question. What apps depend on GUI ? That can be found with apt-cache rdepends ‘package or lib’ . For instance, apt-cache rdepends libappindicator will show packages that have that lib as dependency and probably provide such applet.

But also to be fair, a terminal app may also interface with GUI without actually having a GUI interface. If your goal to find apps with GUI front-end seek apps that depend on Gtk or Qt libraries

Of course, it also depends of whether package maintainer properly provided dependency description for their package. For standard Ubuntu repositories that’s OK. For external PPA that depends on the developers and maintainers.

Источник

Shell how to see all apps in linux

However, other packages may depend on it in which case most package managers won’t let you remove it. Things to keep in mind: Upon update of the package in question the complete content will be restored, including what you removed manually; same with package repair.

How do I list all installed programs?

That depends on your distribution.

  • Aptitude-based distributions (Ubuntu, Debian, etc): dpkg -l
  • RPM-based distributions (Fedora, RHEL, etc): rpm -qa
  • pkg*-based distributions (OpenBSD, FreeBSD, etc): pkg_info
  • Portage-based distributions (Gentoo, etc): equery list or eix -I
  • pacman-based distributions (Arch Linux, etc): pacman -Q
  • Cygwin: cygcheck —check-setup —dump-only *
  • Slackware: slapt-get —installed

All of these will list the packages rather than the programs however. If you truly want to list the programs, you probably want to list the executables in your $PATH , which can be done like so using bash’s compgen :

Or, if you don’t have compgen :

#!/bin/bash IFS=: read -ra dirs_in_path "; do for file in "$dir"/*; do [[ -x $file && -f $file ]] && printf '%s\n' "$" done done 

Answering the second part of the question (nothing really to be added to Chris’ answer for the first part) :

There is generally no way of listing manually installed programs and their components. This is not recorded anywhere if you didn’t use a package manager. All you can do is find the binaries in standard locations (like Chris suggested) and in a similar way, guess where some libraries or some manual pages etc. came from. That is why, whenever possible, you should always install programs using your package manager .

Читайте также:  Чем отформатировать систему линукс

Programs should be reachable via the PATH, so just list everything in the path:

Expect a result of about 3k-4k programs.

To exclude a probable minority of false positives, you may refine the approach:

for d in $ ; do for f in $d/* ; do test -x $f && test -f $f && echo $f done done 

It didn’t make a difference for me.

How do I list all installed programs?, That depends on your distribution. Aptitude-based distributions (Ubuntu, Debian, etc): dpkg -l; RPM-based distributions (Fedora, RHEL,

How do I list all installed programs by users?

But it’s better to use deborphan for finding unnecessary packages.

DESCRIPTION deborphan finds packages that have no packages depending on them. The default operation is to search only within the libs and oldlibs sections to hunt down unused libraries.

You didn’t mention which distribution(s) you are using, but in centOS or Fedora you could do:

while in Debian or Ubuntu you won’t get as «clean» of an answer.

One approach is looking through dpkg.log files, like this for the current log:

grep » install » /var/log/dpkg.log ,

and this for the previous log:

grep » install » /var/log/dpkg.log.1

and archived logs with this:

zgrep » install » /var/log/dpkg.log.2.gz and so on for each archived log file.

Since you mention this question already, you are certainly aware of its answers, and I am not sure what you actually want.

I don’t want to store programs that I will not longer use.

For all distributions that I know of software is delivered in packages, and if you don’t want a package, you have to deinstall it through the distribution software manager. However, other packages may depend on it in which case most package managers won’t let you remove it.

If you want to remove software that is part of a package that you want to keep in principle but you want to remove parts of it: this is generally neither intended nor supported. Nor is it recommended. You have to do this manually. Things to keep in mind: Upon update of the package in question the complete content will be restored, including what you removed manually; same with package repair. Moreover, if some other system tool xyz you never thought of depends on what you want to remove, then it breaks; in the worst case you end up asking a question here of the kind why does xyz not work, it used to work before which will likely be closed as off-topic. Thus, if this is what you have in mind — please don’t. Spare yourself the trouble and us an unanswerable question.

Different Ways to Check Which Shell You are Using on Linux, A shell is a program through which users can interact with the Operating System. Linux provides commonly 4 types of Shell The Bourne Shell

How to list available app commands in terminal

If you’re using bash(1) , you can use the compgen builtin:

-a for aliases, -b for builtins, -c for commands and -A function for shell functions. You can choose which if these you want to exclude, as you’ll get a rather large list (on my system I get 3206 commands).

Читайте также:  Create partition on linux fdisk

The compgen command is meant for generating command line completion candidates, but can be used for this purpose too.

This is trivial if we assume that «apps you can run» is synonymous with «executables in your path»:

#!/bin/bash IFS=: read -ra _dirs_in_path "; do for _file in "$"/*; do [[ -x $ && -f $ ]] && printf '%s\n' "$" done done 

If you type at least one letter, then press Tab , you’ll see a list of all the executable programs whose name begins with that letter. This is called completion or autocomplete.

You can list all the executable programs with this shell snippet:

( IFS=':'; set -f; for dir in $PATH; do for x in $dir/*; do echo $x; done done ) 

This lists all the executable programs you have, which may be more general than what you intend by “all applications”. You’ll also see a number of commands which are intended to be called by other commands, and are rarely invoked directly by users. A list of the applications that are intended to be invoked from a GUI is available through the *.desktop files under /usr/share/applications . The following command will display them (you’ll find crumbs like %u , %c and so on, indicating what kinds of arguments the command typically expects; they are described in the desktop file format specification).

You may get a better feel for what applications you have installed by listing the packages you have: dpkg -l under Debian, Ubuntu and derivatives; rpm -ql under Red Hat, Fedora, SuSE and derivaties; …

Getting list of installed apps (NOT packages), Here’s a quick-and-dirty shell script that might help you. Adjust the output format to something that’s easy to parse for you. Finding the

List out all the Shells Using Linux Commands

There are various methods to list all the shells which are installed in our Linux system. A Shell is a software program that acts as an interface between the user and the operating system(OS). It can also be thought of as a command interpreter that is used to execute another program.

Method 1: Using cat command

using cat command to find the shells in Linux

Explanation: The list of all the shells which are currently installed in our Linux system is stored in the ‘shells’ file which is present in /etc folder of the system. It has read-only access by default and is modified automatically whenever we install a new shell in our system. As we can see, the cat command displays the various installed shells along with their installation paths.

Method 2: Use of grep command with Regular Expressions.

using grep command to find shells in Linux

Explanation: Regular Expressions are one of the most powerful tools that come in handy when handling complex expressions. We can use regular expressions with grep command to display all the shells installed in our system as shown above.

Getting list of startup application in linux, All the files in this directory are actually links to the applications and on boot the OS goes through this directory and starts them all. Share.

Источник

Оцените статью
Adblock
detector