Узнать расположение приложения linux

How to find the installation path for a software under linux?

Under linux, I launch a software by typing, e.g., fluidplot. How can I find the installation path for this software?

9 Answers 9

to see where it is executing from (if it’s in your $PATH). Or:

find / -name fluidpoint 2> /dev/null 

to look for a file named fluipoint and redirect errors on virtual filesystems.

Usually they are in /sbin , /usr/sbin , /usr/local/bin or ~ as a hidden directory.

NAME which - shows the full path of (shell) commands. SYNOPSIS which [options] [--] programname [. ] 

@Michael excellent to know. Because of your comment, I just discovered that newer versions of bash also do this. +1 to your comment.

The «Usually they are . » line is pretty disingenuous, additional software should be in /opt/* or /usr/local/bin . ~ is your home directory, I’m confused why you call it «hidden».

Sorry to be ambiguous, I mean ~/.dir . The hidden directory is below the home directory. And I completely forgot about /usr/local/bin dop.

If you use an RPM based distribution (CentOS, RHEL, SUSE, openSUSE) you can use rpm -ql

rpm -ql findutils /bin/find /usr/bin/find /usr/bin/xargs /usr/share/doc/packages/findutils /usr/share/doc/packages/findutils/AUTHORS /usr/share/doc/packages/findutils/COPYING /usr/share/doc/packages/findutils/NEWS /usr/share/doc/packages/findutils/README /usr/share/doc/packages/findutils/THANKS /usr/share/doc/packages/findutils/TODO /usr/share/info/find.info.gz /usr/share/man/man1/find.1.gz 

Things aren’t installed to locations in the Linux/UNIX world like they are in the Windows (and even somewhat in the Mac) world. They are more distributed. Binaries are in /bin or /sbin , libraries are in /lib , icons/graphics/docs are in /share, configuration is in /etc and program data is in /var .

The /bin , /lib , /sbin contain the core applications needed for booting and the /usr contains all the other user and system applications.

Just to add some point to @djsumdog’s answer, if you are using DPKG based dist, like Ubuntu, you can use

to check what it is about, and

dpkg --listfiles some_package 

to check what files are included/relevant to this package. It’s for packages that don’t have a binary to run, like libnss3 . And

Читайте также:  Операционная система сервера linux windows

to find what package includes this file.

For example, dpkg —listfiles libnss3 gives me:

/. /usr /usr/lib /usr/lib/i386-linux-gnu /usr/lib/i386-linux-gnu/libssl3.so /usr/lib/i386-linux-gnu/nss /usr/lib/i386-linux-gnu/nss/libsoftokn3.chk /usr/lib/i386-linux-gnu/nss/libnssckbi.so /usr/lib/i386-linux-gnu/nss/libnsssysinit.so /usr/lib/i386-linux-gnu/nss/libfreebl3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.so /usr/lib/i386-linux-gnu/nss/libsoftokn3.so /usr/lib/i386-linux-gnu/nss/libfreebl3.so /usr/lib/i386-linux-gnu/libnssutil3.so /usr/lib/i386-linux-gnu/libsmime3.so /usr/lib/i386-linux-gnu/libnss3.so /usr/share /usr/share/doc /usr/share/doc/libnss3 /usr/share/doc/libnss3/copyright /usr/share/doc/libnss3/changelog.Debian.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/libnss3 

Note that the folders are not only owned by this packages, but by others too. Just check the files.

And reversely, dpkg —search libnss3.so gives me:

firefox: /usr/lib/firefox/libnss3.so thunderbird: /usr/lib/thunderbird/libnss3.so libnss3:i386: /usr/lib/i386-linux-gnu/libnss3.so libnss3-1d:i386: /usr/lib/i386-linux-gnu/libnss3.so.1d 

Источник

How can i find the location of installed software in linux?

Is there any command that I can use in the console to know the location of installed software in linux? i have copied a xyz.bin from windows machine to linuxdesktop and installed it. more over can you please tell me how to uninstall a software which is installed in linux Thanks in advance

You might be able to use the find command to search for it. Have a look at this unix.stackexchange.com/questions/19369/…

3 Answers 3

to find the path where the binary is linked to.

Other application specific files may reside in

The way a package is installed/uninstalled on Linux depends on either the specific Linux distribution AND the specific package.

Since you have used a .bin file for installation, it is likely that you have an uninstall command specific for your program in the path.

If you provide more information about the package and the Linux distribution, we can give more help.

It depends on the distribution you’re using. Supposing you are using a debian\ubuntu distribution, you can uninstall it by the apt command, using sudo apt-get remove software_name sudo apt-get purge software_name

Of course you need to have root privileges.

The softwares are usually installed in bin folders, in /usr/bin, /home/user/bin and many other places, a nice starting point could be the find command to find the executable name, but it’s usually not a single folder. The software could have components and dependencies in lib,bin and other folders.

Источник

Как найти расположение программы?

Подскажите, пожалуйста, как найти путь к утилите exp?

Читайте также:  Xerox 6515 драйвер linux

Это оракловская утилита для экспорта.

Получаю сообщения permission denied.

which exp ничего не выводит

whereis exp exp: /usr/share/man/man3p/exp.3p.gz /usr/share/man/man3/exp.3.gz

Путь должен быть связан с oracle.

Ну ты понял, куда Оракл установлен, там и ищи

Я пробывал искать где установлен oracle, но не нашел, писал теже команды что и для exp

# updatedb
# locate -r ‘bin/exp$’

Увидел, что ничего не выводит. Может это альяс баша?

А у тебя точно есть эта утилита?

нашел с помощью sudo find

Учи матчасть, кури маны. Оракл поставил, элементарных вещей не знает. Вон из профессии.

Ты действительно думаешь, что для специалиста по рихтовке необходимы знания системного администратора?

Умение пользоваться базовыми консольными утилитами — это не знания сисадмина, это знания ПРОДВИНУТОГО пользователя системы. И я говорю продвинутого только, чтобы успокоить тех кукаретиков, кто считает что консоль обычному пользователю не нужна.

Вот умение тонко настраивать файрвол или поднять DNS/DHCP/LDAP/Whatever-сервер — это уже можно отнести к знания уровня системного администратора.

А что, рихтовщик обязан быть двинутым пользователем системы? Рихтовать не сможет без линукса?

Если ты про Oracle DBA, то если он самолично подымает этот самый Oracle на некой ОС(Linux,Windows, whatever), то он обязан знать её инструментарий(консоль, Powershell, WMI, whatever). Он не обязан знать его досконально, как системный администратор, это не его задача.

Так же как и сисадмин вполне себе должен знать и уметь составить SQL-запрос, но вовсе(хотя и может) не обязан разбираться с тонкостях построения баз данных.

Pinkbyte ★★★★★ ( 25.09.14 20:17:07 MSK )
Последнее исправление: Pinkbyte 25.09.14 20:17:37 MSK (всего исправлений: 1)

Я про человека, которые металл ровняет!
Ты вот орёшь «вон из профессии». А ты вообще в курсе кто он?

Во-первых, лично я не ору «вон из профессии» — ты меня перепутал с анонимусом. Во-вторых, взялся за чужую работу и спрашиваешь бесплатной помощи у специалистов — будь добр соответствовать. Не надо быть гуру, надо уметь читать соответсвующие руководства — это в любой профессии сложнее «копать от забора и до обеда» пригодится.

Pinkbyte ★★★★★ ( 25.09.14 20:34:09 MSK )
Последнее исправление: Pinkbyte 25.09.14 20:34:55 MSK (всего исправлений: 1)

Читайте также:  Пример командной строки линукс

Источник

How to find application’s path from command line?

For example, I have git installed on my system. But I don’t remember where I installed it, so which command is fit to find this out?

Just in case, command -v and which worked in Linux Alpine 3.16.2 (Docker image). whereis and locate did not — not installed.

5 Answers 5

If it is in your path, then you can run either type git or which git . The which command has had problems getting the proper path (confusion between environment and dot files). For type , you can get just the path with the -p argument.

If it is not in your path, then it’s best to look for it with locate -b git It will find anything named ‘git’. It’ll be a long list, so might be good to qualify it with locate -b git | fgrep -w bin .

I use locate endlessly (it is very fast), but for those unaware of it, locate is only as up to date as its most recent database update, which is automatically run daily on my Ubuntu. The refresh command is sudo updatedb . Also locate has built-in regex capability, so commands like this works: locate -br «^git$» . -b` means restrict the search to just the basename . or without the -b , it searches the full pathname .. Also, it only searches paths you have configured it to search.. there is no command-line control of this other than your regex filters.

@Gilles, that’s funny for me the behavior is exactly the opposite: type is a shell builtin that tells me aliases and such, and which is an external program that shows me the path to an executable. although if there’s a builtin that gets in the way that executable won’t get called.

@quodlibetor The problems with which are that it doesn’t know about shell built-ins and functions (which is relevant when you’re wondering what typing the command will do), and it uses a different $PATH on some systems.

Источник

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