I really do wish that more packages on Linux had installation paths clearly noted in a readme.
I’ve been using Linux daily for over a year now and I still have a hard time tracking down config files and install paths. Its just not one of those tasks I do regularly so I always forget best practices when trying to find stuff. The CLI always gives me the best results but getting the commands right can be tedious.
I’ve started saving useful commands in a note on my desktop.
The one on the github that has out of date instructions and tells you to check the discord?
The 6 year out-of-date one on your distro’s wiki?
or The gnu-info/manpage that is only for the original upstream and doesn’t tell you where all the files have been moved or that half of the software isn’t actually installed since it was split out into extra packages for justdebianthings
Do I really need to remind this is free software made by benevolent developers?
I get it it’s infuriating but it’s still in some way a gift you were given and seem unhappy with.
There is a lot of entitlement around free software. People expecting free things, often written in someone’s spare time, to be really polished just don’t understand I guess. On top of that, good documentation is hard to write and sometimes it’s a completely different skill than writing the software itself.
If you give me a 1000 piece puzzle for free, but without the instructions or a box picture to go off of, you’ve done a nice thing by gifting me something but have also failed miserably as I’ll never fuckin solve that puzzle
People can say what they want about Windows, having stuff installed in a folder called Program Files with sub folders using the brand/program name is so much simpler than whatever the fuck is going on on Linux.
Until an app decides to install in the hidden AppData folder with the confusing sub-folder names, or even the root of the user folder, or god forbid in a folder in the root of the C drive
It’s funny because it seems like it’s all just familiarity with conventions on both platforms. I’ve used Linux for around 15 years and I’m completely lost trying to find anything on a Windows computer.
It’s hidden enough that I have had to provide tech support to my friends a few times on this. I think it’s easy to forget how expertise shapes our perspective on these things
Oh right, it’s the only one I’ve seen doing it. You still get the prompt to ask where you want to install it and it just needs to not be in Program Files or you need to give it administrator access so it can update itself…
For system level… it’s definitely more complicated. I check /etc first and then then /usr dirs. If you’re using your system package manager there is generally a way to query it for that information, but it’s typically CLI based.
Or just use our lord and savior NixOS and configure everything in a single directory
WinXP times are long gone, my friend. These days I will sooner dig out where vim plugin source code resides on Linux than figure out config file location for a fucking game on Windows
This does not return all “config files and install paths” as it only ever considers files that came in the package, not files created by the package (such as /etc/samba.smb.conf, which is created during installation), so doesn’t actually solve the problem.
That limitation should’ve been made clear in the advice itself so as not to send users that don’t know better down dead ends, though the subsequent discussion between this and the previous user is a great illustration of how the way some give Linux “advice” just ends up frustrating those seeking advice.
(It even eventually frustrated me because over the years I’ve had to teach plenty of junior developers to not give advice like that, only they’re seldom so bad that they insist they actually know what the other person wants even in the face of a user providing proof that they do not)
I just tried this with Samba (so dpkg -L samba and dpkg -S samba, and I also tried adding grep"smb.conf" and running it with sudo) and I was unable to find the share config file.
It’s located under /etc/samba/smb.conf but that command was returning a path under my local user. This is on Ubuntu
This is a good argument for shipping an empty config file.
Your point stands, but this also isn’t completely unintuitive. There is pattern there: you installed samba and the config is in /etc/samba/. System level installs will almost always install their config in /etc/ and the sub directory will typically match the name somewhat.
There is likely a general thought that if you’re going to administer a samba server, you’ll also be comfortable with conventions and man pages. Although, funnily enough, in the particular case of samba, man smb.conf doesn’t show the path lol
in the postinit inside the .deb file to create the /etc/samba/smb.conf file. They do it this way so they don’t nuke an already created file. I take back that they should be shipping an empty file, this way is better, but it also means you’ll never be able to query it without some changes to the packaging tools.
The man page should mention the path though that’s a bit lame.
-L, --listfiles package-name...
List files installed to your system from package-name.
-S, --search filename-search-pattern...
Search for a filename from installed packages.
dpkg -S /my/file/path
Finds which, installed, package installed the file.
dpkg -L samba | grep .conf
Greps through the list of files installed by a given package.
If the file you want isn’t in there then it wasn’t installed by the package itself (could be created on the fly by the binary for example), in which case obviously the package system can’t track it.
Oh I see, this command didn’t really do what I wanted it to do then. I just wanted to be able to see the locations of any files associated with a program. If I knew the file path I could just find them haha
I really do wish that more packages on Linux had installation paths clearly noted in a readme.
I’ve been using Linux daily for over a year now and I still have a hard time tracking down config files and install paths. Its just not one of those tasks I do regularly so I always forget best practices when trying to find stuff. The CLI always gives me the best results but getting the commands right can be tedious.
I’ve started saving useful commands in a note on my desktop.
i just give up after a couple of minutes if it isn’t somewhere obvious and then search my whole system with grep lmao.
how wonderful to live in a world where compute is so cheap.
Amateur. I read the source on GitHub to see where it’s saving that shit.
Which readme?
The one on the github that has out of date instructions and tells you to check the discord?
The 6 year out-of-date one on your distro’s wiki?
or The gnu-info/manpage that is only for the original upstream and doesn’t tell you where all the files have been moved or that half of the software isn’t actually installed since it was split out into extra packages for justdebianthings
To be honest, sounds like you aren’t using arch btw. Jk I have the same issues on arch
Do I really need to remind this is free software made by benevolent developers? I get it it’s infuriating but it’s still in some way a gift you were given and seem unhappy with.
There is a lot of entitlement around free software. People expecting free things, often written in someone’s spare time, to be really polished just don’t understand I guess. On top of that, good documentation is hard to write and sometimes it’s a completely different skill than writing the software itself.
If you give me a 1000 piece puzzle for free, but without the instructions or a box picture to go off of, you’ve done a nice thing by gifting me something but have also failed miserably as I’ll never fuckin solve that puzzle
Terrible analogy honestly. Feel free to not use this software, nobody will ever force you to use it.
This is not software to entertain you. It’s a tool that you don’t understand how to use and choose to blame the people building it for free.
Ftfy
Just because it’s provided free doesn’t mean you’re off the hook for not telling people how it works, dumbass
Why so hostile and the name calling…? They’re saying it’s a lot of work for oftentimes a single person to do. That’s just the truth.
You’re a fantastic idiot if that’s what you actually think. That’s not what they’re saying nor relevant to the discussion at all
Yikes. Not sure why I expected anything else.
People can say what they want about Windows, having stuff installed in a folder called Program Files with sub folders using the brand/program name is so much simpler than whatever the fuck is going on on Linux.
Until an app decides to install in the hidden AppData folder with the confusing sub-folder names, or even the root of the user folder, or god forbid in a folder in the root of the C drive
Local, LocalLow, Roaming really are confusing names ngl, but %AppData% isn’t really hidden.
It’s funny because it seems like it’s all just familiarity with conventions on both platforms. I’ve used Linux for around 15 years and I’m completely lost trying to find anything on a Windows computer.
It’s hidden enough that I have had to provide tech support to my friends a few times on this. I think it’s easy to forget how expertise shapes our perspective on these things
Also the two Program Files folders that have existed since the switch to 64-bit systems.
And third-party software installers that install stuff into their own secret places. Like Steam games.
I don’t remember seeing something get installed in appdata, but having other files it depends on in there sure does happen though
I’ve seen Electron based apps do this sometimes. GitHub Desktop, for instance
Oh right, it’s the only one I’ve seen doing it. You still get the prompt to ask where you want to install it and it just needs to not be in Program Files or you need to give it administrator access so it can update itself…
It’s pretty ridiculous
For user specific files a lot of modern programs try to adhere to https://specifications.freedesktop.org/basedir-spec/latest/. You should set those environmental variables and check there first.
For system level… it’s definitely more complicated. I check
/etc
first and then then/usr
dirs. If you’re using your system package manager there is generally a way to query it for that information, but it’s typically CLI based.Or just use our lord and savior NixOS and configure everything in a single directory
WinXP times are long gone, my friend. These days I will sooner dig out where vim plugin source code resides on Linux than figure out config file location for a fucking game on Windows
dpkg -L package-name
Or the inverse
dpkg -S /usr/bin/somefile
For apt based distros, obviously.
This does not return all “config files and install paths” as it only ever considers files that came in the package, not files created by the package (such as /etc/samba.smb.conf, which is created during installation), so doesn’t actually solve the problem.
That limitation should’ve been made clear in the advice itself so as not to send users that don’t know better down dead ends, though the subsequent discussion between this and the previous user is a great illustration of how the way some give Linux “advice” just ends up frustrating those seeking advice.
(It even eventually frustrated me because over the years I’ve had to teach plenty of junior developers to not give advice like that, only they’re seldom so bad that they insist they actually know what the other person wants even in the face of a user providing proof that they do not)
I just tried this with Samba (so
dpkg -L samba
anddpkg -S samba
, and I also tried addinggrep "smb.conf"
and running it with sudo) and I was unable to find the share config file.It’s located under
/etc/samba/smb.conf
but that command was returning a path under my local user. This is on Ubuntudpkg -S
requires a full path like the example I gave.dpkg -L samba
should work fine. What is the error you got?No error or anything, but it just doesn’t have the
/etc/samba/smb.conf
file. Just doesn’t have it.dpkg -S samba
does find/usr/share/samba/smb.conf
which isn’t the right file either.This is a good argument for shipping an empty config file.
Your point stands, but this also isn’t completely unintuitive. There is pattern there: you installed
samba
and the config is in/etc/samba/
. System level installs will almost always install their config in/etc/
and the sub directory will typically match the name somewhat.There is likely a general thought that if you’re going to administer a samba server, you’ll also be comfortable with conventions and man pages. Although, funnily enough, in the particular case of
samba
,man smb.conf
doesn’t show the path lolThat’s the thing though, when you install Samba it does create an empty config file at
\etc\samba\smb.conf
, or at least I’ve never created oneI see why it does this now. Debian does
in the
postinit
inside the.deb
file to create the/etc/samba/smb.conf
file. They do it this way so they don’t nuke an already created file. I take back that they should be shipping an empty file, this way is better, but it also means you’ll never be able to query it without some changes to the packaging tools.The man page should mention the path though that’s a bit lame.
You’re confusing the command again
-L, --listfiles package-name... List files installed to your system from package-name. -S, --search filename-search-pattern... Search for a filename from installed packages.
dpkg -S /my/file/path
Finds which, installed, package installed the file.
dpkg -L samba | grep .conf
Greps through the list of files installed by a given package.
If the file you want isn’t in there then it wasn’t installed by the package itself (could be created on the fly by the binary for example), in which case obviously the package system can’t track it.
Oh I see, this command didn’t really do what I wanted it to do then. I just wanted to be able to see the locations of any files associated with a program. If I knew the file path I could just find them haha
dpkg -L PACKAGE_NAME
does what you want. In my initial reply I mentioned thatdpkg -S
is the inverse.Here is the entire output I get when I get that command.
username@server:~$ dpkg -L samba /usr/share/doc/samba/examples /usr/share/doc/samba/examples/LDAP /usr/share/doc/samba/examples/LDAP/README /usr/share/doc/samba/examples/LDAP/get_next_oid /usr/share/doc/samba/examples/LDAP/ol-schema-migrate.pl /usr/share/doc/samba/examples/LDAP/samba-nds.schema /usr/share/doc/samba/examples/LDAP/samba-schema-FDS.ldif /usr/share/doc/samba/examples/LDAP/samba-schema-netscapeds5.x.README /usr/share/doc/samba/examples/LDAP/samba-schema.IBMSecureWay /usr/share/doc/samba/examples/LDAP/samba.ldif /usr/share/doc/samba/examples/LDAP/samba.schema /usr/share/doc/samba/examples/LDAP/samba.schema.at.IBM-DS /usr/share/doc/samba/examples/LDAP/samba.schema.oc.IBM-DS /usr/share/doc/samba/examples/logon /usr/share/doc/samba/examples/logon/genlogon /usr/share/doc/samba/examples/logon/genlogon/genlogon.pl /usr/share/doc/samba/examples/logon/mklogon /usr/share/doc/samba/examples/logon/mklogon/mklogon.conf /usr/share/doc/samba/examples/logon/mklogon/mklogon.pl /usr/share/doc/samba/examples/logon/ntlogon /usr/share/doc/samba/examples/logon/ntlogon/README /usr/share/doc/samba/examples/logon/ntlogon/ntlogon.conf /usr/share/doc/samba/examples/logon/ntlogon/ntlogon.py /usr/share/doc/samba/examples/printing /usr/share/doc/samba/examples/printing/VampireDriversFunctions /usr/share/doc/samba/examples/printing/prtpub.c /usr/share/doc/samba/examples/printing/readme.prtpub /usr/share/doc/samba/examples/printing/smbprint.sysv /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/samba /usr/share/man /usr/share/man/man1 /usr/share/man/man1/log2pcap.1.gz /usr/share/man/man1/mvxattr.1.gz /usr/share/man/man1/oLschema2ldif.1.gz /usr/share/man/man1/profiles.1.gz /usr/share/man/man1/sharesec.1.gz /usr/share/man/man1/smbcontrol.1.gz /usr/share/man/man1/smbstatus.1.gz /usr/share/man/man8 /usr/share/man/man8/eventlogadm.8.gz /usr/share/man/man8/nmbd.8.gz /usr/share/man/man8/pdbedit.8.gz /usr/share/man/man8/samba-bgqd.8.gz /usr/share/man/man8/samba-gpupdate.8.gz /usr/share/man/man8/samba.8.gz /usr/share/man/man8/samba_downgrade_db.8.gz /usr/share/man/man8/smbd.8.gz /usr/share/samba /usr/share/samba/admx /usr/share/samba/admx/GNOME_Settings.admx /usr/share/samba/admx/en-US /usr/share/samba/admx/en-US/GNOME_Settings.adml /usr/share/samba/admx/en-US/samba.adml /usr/share/samba/admx/ru-RU /usr/share/samba/admx/ru-RU/GNOME_Settings.adml /usr/share/samba/admx/samba.admx /usr/share/samba/mdssvc /usr/share/samba/mdssvc/elasticsearch_mappings.json /usr/share/samba/update-apparmor-samba-profile /var /var/lib /var/lib/samba /var/lib/samba/printers /var/lib/samba/printers/COLOR /var/lib/samba/printers/IA64 /var/lib/samba/printers/W32ALPHA /var/lib/samba/printers/W32MIPS /var/lib/samba/printers/W32PPC /var/lib/samba/printers/W32X86 /var/lib/samba/printers/WIN40 /var/lib/samba/printers/x64 /usr/share/bug/samba/presubj /usr/share/bug/samba/script
Now, if I grep those commands, I get these outputs
username@server:~$ dpkg -S samba | grep "smb.conf" samba-common: /usr/share/samba/smb.conf samba-common: /usr/share/doc/samba-common/examples/smb.conf.default python3-samba: /usr/lib/python3/dist-packages/samba/gp/gp_smb_conf_ext.py
username@server:~$ dpkg -L samba | grep "smb.conf" username@server:~$
And these are copy and pasted straight from my terminal.
You might want to look into the locate package (it might be called mlocate) if you can’t find a file. It can be helpful.
Great idea
Usually under ~/.config/<app> or ~/.local/share/<app>
Often also in /etc/
Or ~/.<app>
As a long time linux user, I think all programs should have a config gui. (Not all, but you get what I mean)
I think it should be GUI config or detailed man page/readme. The amount of assumed end-user knowledge by devs is way too high.
Every time I touch a config file/setting I document it in my notes. I would be lost without it.
I usually start inotifywatch with read events, open the program, close it and see what inotifywatch dumped.
Suprised nobody said to use whereis xyz