Where do packages get installed in debian systems?
Solution 1
Example code on Debian-based systems like Ubuntu is usually stored in /usr/share/doc/<package name>/examples
.
For more information about what goes in which directory, check out the Filesystem Hierarchy Standard, which Ubuntu follows for the most part.
Solution 2
Use this command
dpkg -L {package}
Generally there are two tools for managing packages in debian systems. apt-get and dpkg.
More information in these links :
http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html
http://www.cyberciti.biz/howto/question/linux/apt-get-cheat-sheet.php
http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php
Cheat sheet for both apt-get and dpkg: https://blog.packagecloud.io/eng/2015/03/30/apt-cheat-sheet/
Solution 3
dpkg -L expect
will list the /var/lib/dpkg/info/expect.list
file for the package which lists full path of the each of the packages files. You may want to pipe it to less
so you can read it.
man hier
should give you a description of the file system hierarchy used by Debian. The maintainers tend to be quite religious about following it and will often create symlinks to directories to allow programs that don't follow it to work within their structure.
Documentation goes in /usr/share/doc/<package-name>
, so expects documentation will be found in /usr/share/doc/expect
. There may be multiple example
subdirectories below that, along with other directories which may contain runnable code. man pages go elsewhere, but can be found with the command man -k expect
.
For other packages just replace expect
in the above commands with the package name.
Related videos on Youtube
John Smith
Updated on September 18, 2022Comments
-
John Smith over 1 year
I recently installed expect on my Ubuntu system and cannot find the example code that is supposed to come with it. I searched /usr/lib /usr/bin/lib /lib...no luck. I guess it's about time I learned how these things are organized.
Your help is greatly appreciated!
-
dmckee --- ex-moderator kitten almost 13 yearsErr...you wouldn't want example code in
*/lib
as those directories are for libraries in the "link-to-your-program" sense of the word.
-