Which directory does the package be installed?

root@OpenWrt:~# opkg info tree
Package: tree
Version: 1.8.0-1
Depends: libc, libgcc1
Status: install user installed
Section: utils
Architecture: x86_64
Size: 25180
Filename: tree_1.8.0-1_x86_64.ipk
Description: List contents of directories in a tree-like format
Installed-Time: 1623979331

I get no info about which directory the tree package installed.

root@OpenWrt:~# opkg install tree
Package tree (1.8.0-1) installed in /var is up to date.

Does it means that tree is already installed in /var?

root@OpenWrt:~# find /  -name  tree 
root@OpenWrt:~# df  /usr/sbin/tree
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root            214395592  17414408 196964800   8% /

Does it means that tree is already installed in / , instead of /var?

1 Like

No it means it's installed in the /usr/sbin/ directory which is part of the file-system mounted at /.

OpenWrt as a Linux system adheres to the Filesystem Hierarchy Standard as most Linux and UNIX based systems do.

/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files. In OpenWrt /var/ is kept in volatile memory only. Its lost after shutdown and re-created on reboot.

/usr is shareable, read-only data. Like installed software binaries and libraries.