Does anyone use MidnightBSD? Currently trying to install a FAMP Stack hoping since it's a fork it'll be close enough to work with a little work. The problem is I don't seem to have the rehash command to regenerate the system’s cached information. should be a builtin No? reddit / BSD ---------------------------------------------------------------------- -thankthebusdriver · 2021-11-30 03:47 Please excuse anything wrong in this post feel free to correct me but I'm very new and have been forced into MidnightBSD for a project. do I need to rehash at all?? I'm following a [digital ocean tutorial](https://www.digitalocean.com/community/tutorials/how-to- install-an-apache-mysql-and-php-famp-stack-on-freebsd-12-0) on FreeBSD hoping this will work. Step 3 is where I'm running into problems. Any Ideas? ---------------------------------------------------------------------- jggimi · 2021-11-30 03:56 The "rehash" is a C shell internal command. From the csh(1) man page: rehash Causes the internal hash table of the contents of the directories in the path variable to be recomputed. This is needed if new commands are added to directories in the path while you are logged in. This should only be necessary if you add commands to one of your own directories, or if a systems programmer changes the contents of a system directory. ---------------------------------------------------------------------- GreenSage13 · 2021-11-30 04:06 Good luck on your FAMP, I tried a WAMP but settled on LAMP. ---------------------------------------------------------------------- rdcldrmr · 2021-11-30 05:00 > I'm very new and have been forced into MidnightBSD for a project. You must have a cruel teacher or something. Why not ask him to let you do this on a BSD that's actually in use for *AMP stacks in the real world? FreeBSD or OpenBSD would be fine. (I say this genuinely: I'd love to learn the reason why you have to learn what's borderline useless.) ---------------------------------------------------------------------- PunishedRaion · 2021-11-30 06:34 rehash for tcsh/csh. ---------------------------------------------------------------------- LowerSeaworthiness · 2021-11-30 06:45 The bash equivalent is "hash -r". ---------------------------------------------------------------------- -thankthebusdriver · 2021-11-30 08:12 My prof wanted us to “explore lesser known distros” which he assigned us as the central piece to our final. We have mostly been dealing with Ubuntu and CentOS inside of regular classwork. No hate on the prof he’s actually a great guy and has helped me learn a lot of Linux and Unix in a semester, but this project has been a headache to say the least… ---------------------------------------------------------------------- -thankthebusdriver · 2021-11-30 08:18 Since I’m dealing with Midnight a fork of FreeBSD I’d have to imagine a FAMP is my best option, obviously a WAMP is out of the question cause this isn’t windows (unless I’ve misunderstood something from a quick look), and a LAMP would probably be even more of a issue. ---------------------------------------------------------------------- reddit_original · 2021-11-30 10:48 He did you no favors and told you some lies. "Here, use this little known desktop BSD as a server instead of the most used BSD. Don't learn the most used BSD." ---------------------------------------------------------------------- GreenSage13 · 2021-11-30 12:17 Ah hahaha. XD ---------------------------------------------------------------------- -thankthebusdriver · 2021-11-30 18:06 well, it didn't give me any output, but it also ran without any issue so that seems like a good sign lol. Hopefully, the rest of this setup goes smoothly. still boggles my mind that it wouldn't recognize the rehash command. It's even listed in the ancient documentation a few times. ---------------------------------------------------------------------- VENTDEV · 2021-11-30 19:13 Actually I think it's a smart idea. You'd learn quite a bit from this exercise. The goal isn't learning the OS. It's learning the frustrations and real world issues that you run into when implementing things on computers. How to troubleshoot, use logic, read manuals, and properly ask questions to a community. As a programmer writing low level C and C++, it's pretty much what I do day in and day out trying to make software work. I'm sure it's true in IT, when the boss buys some obscure software and you've got to make it work on hardware it wasn't built for. As you can see, he can't follow a step by step tutorial, kid is going to have to figure it out himself and get it to work. Thumbs up to the teacher IMO. Edit: That being said, it can be done. I suggest OP ping the MidnightBSD guys on their IRC channel. ---------------------------------------------------------------------- reddit_original · 2021-11-30 23:25 In what way is any of that different than what he could do with FreeBSD? ---------------------------------------------------------------------- kraileth · 2021-12-01 05:09 One thing that you should know is that while MidnightBSD is technically a fork from FreeBSD, this has happened 15 (!) years ago. Which is a *very* long time in the IT. The only other long-standing project that forked even earlier is DragonFly BSD. *A lot* of development has happened in FreeBSD since then. MidnightBSD is a somewhat special case, though. Just as DragonFly BSD, it forked to become an independent project. Unlike the other it has failed to attract enough members to make this possible. Therefore it has merged changes from more recent versions of FreeBSD back into MidnightBSD. They do have developed features of their own, though! In some regards as important as package management, their OS diverges greatly from FreeBSD. If that's for the better or the worse is yours to judge. It's a fact unfortunately that there are problems with mports most of the time I tried to use them (this is for the lack of manpower behind the project, not because the ports system being bad per se). You've done the right thing by looking at a FreeBSD tutorial. But it totally won't apply 1:1. While you've got a pretty cool task, please try to remember what MidnightBSD is: A project that's amazing if you consider that basically one person does all of the work. But no matter how skilled this person is, it should be obvious that it cannot match efforts that are driven by hundreds of developers. And so MidnightBSD (which I *do* like and have a lot of respect for) can be an exercise in pain - especially if you're new to BSD. Major takeaway: If your experiences are not great in the end, don't simply dismiss all of BSD for the rest of your carrier. ---------------------------------------------------------------------- -thankthebusdriver · 2021-12-01 05:23 Thanks for breaking down some of the reasons I ran into or have ran into problems. Love to see someone who has actually used MidnightBSD and experienced some similar issues. For mports specifically due to my lack of experience and outdated documentation I actually had to contact the dev directly! It’s wild to me that I can claim that even for a small OS like MidnightBSD, but that has helped alleviate some of my major issues. For the most part MidnightBSD seems disliked because of its problems which something like freebsd doesn’t have, but as you mentioned in the context of one guy it’s incredible what has been accomplished. ---------------------------------------------------------------------- -thankthebusdriver · 2021-12-01 05:28 I definitely would love to boot up freebsd in the future and see what the most popular BSD has to offer. Though I might not have a chance for a while. ---------------------------------------------------------------------- VENTDEV · 2021-12-01 13:56 > In what way is any of that different than what he could do with FreeBSD? The same way installing it on FreeBSD is different than pretty much any Unix-like operating system. It isn't. But OP couldn't find a how to step by step tutorial to install it on MidnightBSD. So he had to figure out to use a FreeBSD tutorial. Then he still ran across an issue installing it following a FreeBSD tutorial, so he had to ask for help. When you ask for help, you need to properly format your question. (He didn't do to well with this, but it was good enough for him to get an answer.) And so he learned a difference between between shells and hashing. Anyway, If he'd just blindly followed a copy and paste line by line tutorial, he would have never learned something new. Which funny enough, what he learned applies to all Unix-like OS's. (Of course asking for help is a cop out too. As he could have searched online, found out what rehash is, find out what shell MidnightBSD uses, and then figured out the equivalent. But asking questions properly is a good skill to learn none the less.) Plus we don't know what the future has in store. Perhaps they end up doing stuff which completely deviates from FreeBSD, so he's stuck in an even poorer documentation situation. From your previous reply: > He did you no favors and told you some lies. "Here, use this little known desktop BSD as a server instead of the most used BSD. Don't learn the most used BSD." Any monkey can copy and paste the line by line tutorials that exist for the commonly used OSs (FreeBSD included). But if you ever find yourself in a situation without tutorials and poor documentation, knowing how to address the situation and utilize resources is much more vital life skill than knowing basic usage of the most popular, but still obscure BSD. All that being said, if they're just installing a php web stack, then really it's a wash. If they start doing more complex stuff where the two OS's deviate, there is some educational merit. Of course, we don't know what kind of class this is, but from the sounds of it, it isn't about learning how to use operating system x. And that's a good thing. Think of how many families of OSs you've used in computing. At a minimum it's probably 4, if you're older 5. And a lot of things don't translate between them. ---------------------------------------------------------------------- reddit_original · 2021-12-01 16:06 Again, he'll do all the same things with MidnightBSD when he has problems. That he's more likely to find cut/paste solutions doesn't matter and defeats the purpose of his learning, if that's what he really wants to do. If he wants to learn BSD, then pick a well-known, popular BSD and do that. Otherwise, if you want a situation of lack of tutorials and gaining life skills, install Plan9 and really go to town. ---------------------------------------------------------------------- VENTDEV · 2021-12-01 16:14 It's not what he wants to do, it's what his professor is telling him to do. OP will always go down the path of least resistance, he's in it for the grade. I would have shoved HaikuOS on him myself. :) ---------------------------------------------------------------------- -thankthebusdriver · 2021-12-03 02:06 Well I finally got it up in running well everything I need for my particular use case. If I was trying to run a proper lamp stack or any other variant for that matter I wouldn’t be trying to do it on MidnightBSD lol.