The problem with GNOME isn't a lack of unified vision; it's treating UI like a bikeshed. Just like the kernel exists solely to serve userspace, the UI exists solely to serve the user, and that requires stability. But hundreds of GNOME maintainers treat it like a running experiment in HCI, rather than what it really is: something that just needs to get out of the way so we users can do real work.
It might help if you indicated which BSD you tried to install, they all differ in support for hardware. OpenBSD forked from NetBSD 18 years ago, and both FreeBSD/NetBSD are in their 20s. Time has understandably lead to considerable divergence since 386BSD/4.4BSD.
/r/bsd /r/openbsd /r/freebsd
For anyone curious:
I don't think either style is ideal.
If the email were implemented differently this could be fixed. The old bike-shed email had a nice nugget of wisdom:
>But let me suggest a few pop-up windows I would like to see mail-programs implement whenever people send or reply to email to the lists they want me to subscribe to:
+------------------------------------------------------------+ | Your email is about to be sent to several hundred thousand | | people, who will have to spend at least 10 seconds reading | | it before they can decide if it is interesting. At least | | two man-weeks will be spent reading your email. Many of | | the recipients will have to pay to download your email. | | | | Are you absolutely sure that your email is of sufficient | | importance to bother all these people ?
I'm on a few meetup group list-servs, I remember this happening on the first email I sent. I was very happy. I'm not sure if they do it on each one, though, or just the first. But it would be nice if something popped up that said "#people are going to receive this email. Are you sure you wont to send it?"
Unix, it is a direct descendent of the original BSD sources. Although it cannot call itself Unix because it is a trademark for which you need to pass certification, which costs money.
See also http://www.freebsd.org/doc/en/articles/explaining-bsd/what-a-real-unix.html
I don't work for Amazon, but I work with Amazonians a lot. (I maintain the FreeBSD/EC2 platform.) If I had to describe their corporate culture, I'd say two things:
They're results-driven, and expect results. People are expected to Get Things Done, even if it means working far longer than "normal" hours.
It really really matters which team you end up on. Some teams are great; others are completely dysfunctional. The bad reviews you see are from people who were unlucky and landed in dysfunctional teams. The good reviews you see are from people who were lucky and landed in good teams.
FreeBSD will be the easiest to get you started, OpenBSD will be the most secure, NetBSD will boot on absolutely anything. This is all I know since I've only worked with FreeBSD.
Almost all software released for Linux should be able to compile on a FreeBSD. It's most probably in ports anyway. Just go to /usr/ports/category/softwarename && make install
The FreeBSD Handbook covers 99.9% of everything you will want to know for the first half year of using FreeBSD. After that you are either googling for very specific answers or you're in a situation nobody has ever been in.
Use the ports system. On a newly installed system, run "portsnap fetch extract" to get the newest ports tree. "portsnap fetch update" whenever you have to install software again.
System-stuff is in /etc, userland stuff is in /usr/local/etc.
Example: If you install nginx, the config files will be in /usr/local/etc/nginx and the init script to start/stop service will be in /usr/local/etc/rc.d/nginx
If you will want to enable the provided nfs daemon, you will add your share to /etc/exports and start nfsd with /etc/rc.d/nfsd start.
FreeBSD comes with a few basic network services pre-installed. These are ftpd, nfsd, opensshd, named, and I've probably forgotten some. They are not enabled by default but are very easy to set up.
All services, network configuration, etc, is controlled through /etc/rc.conf
Use net-mgmt/portmaster to install ports. It's much smoother.
It will be a bit confusing in the beginning but worth it in the long run. FreeBSD is a good stable operating system.
Have fun :)
I would suggest FreeBSD. It is the most supported and documented of the available flavors and therefore will be the easiest to transition to. The FreeBSD Handbook will pretty much tell you ANYTHING you need to know. Between that and googling (which actually leads you to the handbook most of the time anyways) you can figure out most everything. What I would suggest is to come up with some purpose for it and then set out to fulfill that purpose. For instance, setting up a web server or a DNS server. It's not really designed to be a desktop OS so if that is your intention than you may want a different flavor. I wouldn't even recommend installing the GUI.
*EDITED for additional clarity
Linux distros all use the linux kernel with slight modifications. BSD on the other hand has a few branches, FreeBSD, NetBSD etc.. which all have their own kernels and source trees. I recommend you read this: http://www.freebsd.org/doc/en/articles/explaining-bsd/comparing-bsd-and-linux.html
I have read all the comments, and as far as I can tell all the misunderstandings have been cleared up by various good people here on reddit.
On a PDP a 64k string would be plenty, as that was the size of the address space for any instruction.
In todays stronger typing, it would be { size_t, char * } but personally, I prefer to use ptr+ptr formats, since they have no portability issues at all, and the subtraction to get the length is free on modern memory starved CPUs.
The argument that C was/is a weakly typed language misses the point somewhat. This "virtue" of C is a subsequent rationalization of a necessity: Implementing strings as arrays of char meant not having to write compiler code to implement a string type.
I'm surprised that while people pointed to UTF-8's variable length encoding, nobody pointed out that the very reason we need that, is exactly because of NUL-terminated strings.
And yes, nothing prevents you from implementing your own "true" string type in C.
I've personally done this far more time than is sensible. "Sbufs" (http://www.freebsd.org/cgi/man.cgi?query=sbuf&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html) is the most comprehensive and secure of these, and it works both in the FreeBSD kernel and userland.
Finally: to the people who thought I advocated a 255 byte string limit, I can only recommend that when you read stuff, you should experimentally assume that the moron is at the opposite end of the communication than you currently pressume, before you open your mouth and make this painfully obvious for everybody.
(I'm happy to respond to any questions you might have)
I've been a system administrator for a long time :-) A lot of the learning is hands-on. For example, you can't really understand what "ln" does without understanding how filenames are linked to inodes.
But as for learning Unix concepts, and keeping in mind that these are general Unix concepts and not OS X specific -- and that they're about the design of Unix, not how to use it! -- there's The Design and Implementation of the 4.4BSD Operating System which has been a standard reference for decades and is freely available online, or The Unix Programming Environment by Kernighan and Pike which is not free but has been in publication since 1984.
And, of course, I recommend getting your hands dirty. It's true that OS X is built on Unix heritage (the underlying OS, Darwin, is based on BSD Unix), but you can ignore all of that pretty easily, so there's something to be said for running Linux on an old PC, or even in VirtualBox, especially since with the latter you can break things and just go back to a previous snapshot!
The problem is that the BSDs and Linux are run in completely different ways. The BSDs are seen as an operating system with additional software (ports), whereas Linux projects are seen as an amalgam of software (kernel, coreutils, base packages, etc).
Since the BSDs are run as a single project, a centralized version control system makes a lot more sense. For the BSDs, having one giant repository for the operating system with subtrees for individual components makes a lot of sense. You can do this with git submodules, but each of the components isn't a separate project, it's a piece of the whole.
While git
could be used for BSD development, it isn't the right idiom. The BSD's aren't developed in forks, they're developed in tree (you send problem reports to GNATS and a committer makes necessary changes). FreeBSD does have official git mirrors, but they don't accept changes; they're only there for convenience.
They also serve as a good reason why autotools should go away. From the tutorial:
> Consider C functions...
> that do not exist everywhere(e.g., strtod())
> that have different names (e.g., strchr() vs index())
> that have varying prototypes (e.g. int setpgrp(void) vs setpgrp(int,int)
> ...
> How should a package deal with those?
It shouldn't. You are either developing for a standard system or you are not. If you are not, you have a bunch of ifdefs. If you are, and your software doesn't work on a substandard system which you would like it to, then you bring that system up to standard, not the other way around. FreeBSD got it right.
No, he actually meant /dev/random.
There's no /dev/urandom on FreeBSD, it only has symlink pointing to /dev/random.
Here is manpage about random device: http://www.freebsd.org/cgi/man.cgi?query=random&sektion=4
Edit: Also I think it needs to be pointed out that FreeBSD also preserves seed across reboots that way the most dangerous time is on first boot after installation.
My point is actually really that Linux network configuration is a heap of shit.
If you compare it to FreeBSD's for example, everything is well integrated, abstracted, consistent and is done in one place. networkd is just a layer over the top of Linux's current glittery turd. If they fixed the fundamentals, networkd isn't required.
Look at this documentation and tell me why this isn't as good in Linux considering there are a thousand more personalities at the helm:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/advanced-networking.html
http://www.freebsd.org/cgi/man.cgi?query=rc.conf
http://www.freebsd.org/cgi/man.cgi?query=ifconfig
Tell me why when I have a down system and no network up I can't refer to any documentation that isn't a pile of crap either.
FreeBSD is a dream to administer. It's incredibly simple and straight forward. There's a long standing policy referred to as POLA in the BSD camps: Principle of Least Astonishment.
Put simply, FreeBSD goes to great lengths to be easy to administer. You'll pick it up in no time.
Hell, I can summarise the main points here:
/etc/rc.conf
. No separate /etc/hostname.*
crap. Everything lives in one spot./etc/defaults/rc.conf
. (So you view that file to figure out what to put in /etc/rc.conf
.)/etc/rc.d/<name>
script; i.e. /etc/rc.d/named restart
./usr/local
(it's nice having /usr/local/etc
separate from the system /etc
, for example)./usr/local/etc/rc.d
works the exact same way as /etc/rc.d
; i.e. /usr/local/etc/rc.d/apache22 reload
.Working with Linux often brings me to tears. 50,000 distributions that all feel the need to do things slightly differently. It's a fucking nightmare.
FreeBSD is a joy to administer in comparison.
(I also highly recommend OpenBSD. Personally, if it's public facing or in a primary network role, it's OpenBSD, hands down. If it's internal, storage, high performance or general role, FreeBSD.)
You could definitely try many different passwords in parallel, but each password would take considerably more time.
Here's some discussion of this approach: http://news.ycombinator.com/item?id=1041069
PHK's implementation of this approach is the most famous. It's worth reading: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libcrypt/crypt-md5.c?rev=HEAD
As icantthinkofone said, the average FreeBSD user would be fucking pissed if they installed a port/package that installed a bunch of other shit that isn't required. The fact apt-get installs mysql is perhaps more annoying. What if you wanted a specific version, or if you wanted to use PostgreSQL. If you install something that requires a dependency like mod_php5 and apache isn't installed it will be done so automatically and it'll modify httpd.conf for you.
As for ports, they're the same thing as packages. The packages are literally just pre-compiled versions of the port. Using a package means you don't have to wait for it to compile, but it will be built with the default options of the port. If you want to configure any build time options(make config) you need to use the port, same with specifying what compiler and compiler flags(/etc/make.conf if you wanna make it global). As for /usr/local, FreeBSD does not mix the base system with 3rd party software, ever. See the handbook section or the heir(7) man page.
The FreeBSD team has a large cluster of machines dedicated to building packages full time, so that you don't have to build from ports. The old build cluster was called Pointyhat, not sure what it is now since the switch to pkgng.
If you want faster port turnaround, you should be operating your own poudriere or tinderbox installation. Simple as that. Constantly building binaries that work on 99% of systems is resource expensive, and resources are scarce.
Otherwise, port build is dependent on time and resources being available to build the port in question. It's entirely automated. Just because there's yet another OpenSSL security fuckup does not mean it gets moved to the head of the line. Just that it will get rebuilt when resources available. There's nearly 24,000 packages and some of them either have licensing restrictions or would take literal hours to build no matter how much hardware you threw at it.
And FYI, the binary packages use system openssl by default. Not security/openssl. Coverage would be via freebsd-update not pkg update.
First of all, which BSD? I can't find such an option in FreeBSD's cp(1).
The basic reason, I expect, is that a good progress bar is quite tricky to implement (what's the cost per megabyte and per file?) and nobody's gotten around to it. Standard Unix cp(1) only does one pass over the files; it doesn't find all their sizes and then start copying.
Anyway, you can sed bug reports and feature requests to if you like.
This isn't ridiculously far out; the FreeBSD security notices are similarly well handled. Tarsnap's developer works on FreeBSD too though, so perhaps there is a correlation. :)
Oh. A "system administrator".
Usually that's code for "too stupid and/or lazy for CS".
And anyone on (or who works with people on) this list should know that OS X, while incorporating elements of FreeBSD and OpenBSD, is actually based on NeXTSTEP, which pre-dates FreeBSD by about five years.
The fact that you're complaining about not being able to boot a 5+ year old computer with an MP3 player because the Apple store doesn't stock a cable they haven't produced for years leads me to think that this should be posted to r/firstworldproblems as satire.
Please feel free to post links to your commits.
Edit: and Open Firmware hasn't shipped on an Apple laptop for over five years. Surely a "leet 'puter haxxor" such as yourself can afford a computer newer than that?
Edit2: and slackware 4 is what, twelve years old? I sincerely hope you are no longer using such an insecure and obsolete distro. Or, if that wasn't the meaning of your comment, I hope that compiling a Linux kernel isn't on your resume as a bullet point example of your computer expertise.
Dude, I'll never understand why you recursively did THE ENTIRE SYSTEM, but I'd like to take a moment to point out that FreeBSD comes with a utility called mtree(8) which would let you recover the permissions of nearly your entire system. This article shows it has been around since at least 1999....
You see, FreeBSD comes with these mtree files in /etc/mtree which will let you fix the permissions of your entire system (except /home, /usr/local, and perhaps /var/log and other things that change in /var). You can easily cron a nightly job to create mtree definition files of these other places to be able to recover in minutes from the exact situation you have described.
tl;dr Please, someone -- port this to Linux and make it a part of the standard distros. Linux has had over a decade to replicate this life saving utility and nobody cares?!
>I really don't understand the vitriolic comments and animosity in this sub towards AOO.
Let me try to explain:
Essentially, AOO is just plain worse than LO in every technical aspect. That would be okay, except it's sitting on the much better-known "OpenOffice" brand, which means it leads uninformed users to use a worse product.
If Oracle had just given the code and trademark to TDF, they could have used it. If Oracle had given it to Apache right away, before TDF got settled and LO started, the community could have flocked to AOO. The situation right now is the worst of both worlds, and the only feasible way to get it to improve is for AOO to die.
I have nothing against AOO contributors as people, but I do hate that they still string along that project.
>the BSD Users that depend on AOO
Why do they depend on AOO? Licensing? If so, I have no pity to offer - the LGPL is, to my mind, a usable license, and I see everyone who refuses to use it as zealot. Sucks for them, I guess. (If it's more technical reasons, it's different of course and LO should get that sorted)
Edit: It seems like LO can be installed on FreeBSD.
More like kids these days with their non-portable system calls
> You obviously never have used any BSD if you are legitimately saying this.
Well, I suppose you know more about what I've done in life than I do, so I will defer to your omniscience.
> They are not slow one bit
Compared to every GNU/Linux distro I've used, they were. OpenBSD especially was much slower to boot. Waiting for ports to compile or for pkg_add to actually do something (I know it's now pkgng; this was a couple of years ago) was extremely tedious.
> they aren't much older package
I didn't say in all cases, but they can be. Let's take the very first package that popped into my head as an example:
http://www.freebsd.org/gnome/ http://ftp.freebsd.org/pub/FreeBSD/ports/packages/gnome/
FreeBSD is on 2.32. GNOME 3 was released over three years ago.
Firefox is version 27.
On the other hand, Clementine is up to date. Like I said, not in all cases.
> nor kernel wise.
Well yes, since they're completely different to the Linux kernel, so comparing their age is pointless. However, the likes of hardware support is definitely more up to date in Linux.
> How is using a much, much faster compiler for I believe 3 generations now not stable?
That's a handsome straw man. I didn't mention anything about the speed of the compiler, did I?
> Your talking out your ass
That's not possible. It would be an interesting evolution of human anatomy, though I'm not sure what purpose it would serve.
> and this subreddit is eating you up.
What?
I actually still like the BSDs and I was initially excited to explore that new world, but found that after a year, my life was being made a bit more difficult. So, I went back to GNU/Linux.
Move to BSD and feel like a real man. And enjoy using a real Ancap operating system licensed in a way that doesn't use intellectual property laws to restrict how you can use it.
Not too hard of a transition for a linux user: http://www.freebsd.org/doc/en/articles/linux-users/article.html
The only reason busybox/linux distro people bag on the layout is because the layout used in most distros is horrible. Why can't people stop reinventing the wheel and follow freebsd's clear, concise, and sensible hierarchy? There really are reasons for /bin and /usr/bin -- especially in a single user / rescue mode when you're trying to fix the system. Does everyone just run / and swap these days on production systems? Why don't you have /usr and /var separated from / ?
Unfortunately, there is now no single "killer app" thing that BSD does better than Linux, as Linux has matured much in the last decade. Nowadays it comes down to small differences and preferences. Someone described it as "BSD is more comprehensible" in the sense that it is much easier to avoid treating parts of it as a black box: since it encourages a more low-level approach to using it than modern Linuxes, people using it tend to learn more details of what is going on behind the scenes and can respond better to problems. (don't get me wrong: both Linux and the BSDs are still MUCH more technically oriented than Windows and Mac OS X).
This is a large reason of why I use it: I've found too many cases when Linuxes try to outsmart the users, don't come with proper diagnostic tools, are too stubbornly "NIH-crippled", etc. FreeBSD also comes with quite modern tools (GEOM, Netgraph, ZFS) which do complex tasks in a very simple way, something which the GNU folks have never really learned. See e.g. the command line examples for http://linux.die.net/man/8/iptables and for http://www.freebsd.org/cgi/man.cgi?ipfw .
As for performance, etc. then no, you probably won't see much difference in the common case (not discussing edge cases).
wc basically does (excluding code not related to line counting):
char buf[MAXBSIZE]; ssize_t len; char *p; int count = 0;
while ((len = read(fd, buf, MAXBSIZE))) { for (p = buf; len--; ++p) { if (*p == '\n') ++count; } }
I don't see here any non-standard stuff - only plain simple and readable C.
See: http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/usr.bin/wc/wc.c
The GNU version from coreutils (excluding error checking) is similar:
while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0) { char *p = buf; while ((p = memchr (p, '\n', (buf + bytes_read) - p))) { ++p; ++lines; } bytes += bytes_read; }
See http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/wc.c
I used to have the same problem at my schools. I showed them OpenACS and they liked it. It's very versatile, can act similarly to blackboard (if you choose), allows complete customization, and completely open source (free). I gathered a group of students that like programming and working with the open source community we made a data base and web interface with openACS and dotlrn (.lrn) (AOLserver on a BSD box) to substitute for the schools current blackboard layout. It also gave them a better to track lent books and calculators. http://openacs.org/ http://www.dotlrn.org/ http://www.freebsd.org/
pf is as uncomplicated as it gets. The only downside to pf is that you will never want to use iptables ever again. Sorry :(
AppArmor is a type of Mandatory Access Control. It looks like FreeBSD has a MAC framework.
Xorg isn't a desktop, think of it as like graphics drivers. You'll need to install a nice desktop manager to get a nice desktop. You may also need to edit your xinitrc or install something like slim and configure it for a login window.
Try install the xfce4 port or package, that's probably a good starting point for a useful and nice desktop.
Alternately, installing kde4 is going to be more batteries included.
Also, check out the handbook:
-r seconds Print the date and time represented by seconds, where seconds is the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(3)), and can be specified in decimal, octal, or hex.
If you have Cisco gear in your network you could use GLBP
http://www.cisco.com/en/US/docs/ios/12_2t/12_2t15/feature/guide/ft_glbp.html
The idea is that the computers use the same IP as gateway and the AVG returns different MACs to the ARP requests for the gateway IP.
This way the computers talk to different routers as their gateways. The load balancing is done via different algorithms depending on what you chose but mostly its in a round-robin style.
Also for non-cisco enviroment here is a FreeBSD implementation I've come across:
This comes up on the FreeBSD mailing lists periodically, and I know because I've been subscribed for over a decade.
These complaints never result in anything much, and I hope they never do. FWIW, the daemon in the logo is generally associated the daemon of ancient mythology/history eg Socrates.
I believe the first rendition of the daemon logo was done by https://en.wikipedia.org/wiki/Marshall_Kirk_McKusick
Ah yes, I see there is something official on it: http://www.freebsd.org/copyright/daemon.html
>Simple: no scripts playing the role of the user.
Don't quite know what you mean by this
>Simple init (bsd init ...)
FreeBSD has that also
>Package management practical and painlessly, with an option to install >from sources.
pkg_add -r bash to install bash or cd /usr/ports/shells/bash/ && make install to install from source
>AUR: Community repository of packages.
FreeBSD currently has 22840 ports available.
>Easy creation of new packages (to not get files around the disk without >a source).
Got that also: FreeBSD Porter's Handbook
>Stability: system once installed does not need frequent maintenance.
Ditto: 3:44PM up 895 days, 22:51, 3 users, load averages: 15.27, 14.36, 15.26
I would start with the manpages: epoll, kqueue They have some useful general information. The first few hits in Google has some minimal examples. Both kqueue and epoll needs about the same amount of code as poll(2) to get going, not exactly rocket science.
You can also get some benefit by using epoll and kqueue in other languages. Python
Hi there,
I don't think there exists such a thing as a "control panel" for FreeBSD, so instead I'd suggest you arm yourself with patience and use the FreeBSD handbook. It's a really good manual that will cover pretty much anything you'll want to do with your BSD box in the first three months of use. If you have a hard time using the command line at all (go to dir, edit file, etc) then I'd suggest looking up a CLI tutorial.
I'm sorry if this isn't the help you're looking for but in my opinion it's the best you're gonna get.
It's not the shell so much that I would miss the Mac Ports play a large role.
Also some of the things I couldn't figure out how to do in Powershell:
There are more issues I found with it but these two are a deal breaker for any serious use of a shell.
Powershell is a poor excuse for what's possible in a unix userland. Also a list of shells available to a unix user: http://www.freebsd.org/ports/shells.html
Ha ha it's much more complicated than just OS X and Windows, I'm afraid, those are just the two filesystems which OS X recognizes. That eighth partition (about 500 GB) is a ZFS Pool, from which I can boot a few different BSD and Linux distributions.
PCBSD has a lot of bells and whistles. (e.g GUI package management, I promise you don't need that)
You shouldn't be afraid to use freebsd. Use the relivent sections of the handbook, and you will have exactly the system you need. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/
Well, strstr()
comes from the C standard library function of the same name and it was modeled to take the arguments in the same order. I'm guessing that strpos()
was written to act just like strstr()
except to return the index, so it inherited the same argument order.
str_replace()
on the other hand most likely comes from the lineage of regex replace, even though it doesn't actually use regex. For example, in Awk, the sub()
and gsub()
functions take the regex as the first argument, the replacement string as the second argument, and the string to act on as the third argument. The same goes for Python's re.sub()
. Perl works a bit differently, but it still borrows the s/search_for/replace_with/
syntax from ed, and it's essentially the same pattern: regex, then replacement.
I have no idea where in_array()
descends from, if anywhere. It was probably just something that someone made up on the spot and picked an argument order arbitrarily.
So while there are reasons for the way things might have ended up this way, they still betray the basic fact that PHP really wasn't designed, it was just thrown together without much thought. You see this a lot in the modules that just ape the underlying APIs of their C library counterparts, even if that results in inconsistencies and hard to use APIs. The PHP mantra seems to be "throw something together, and if it seems to work, ship it."
> Systemd's main developer is rather outspoken about not giving a damn about non-Linux systesm and UNIX/Posix standards
It should be noted here that the old sysvinit system in Debian also depended on the non-posix /proc. So complaining about non-posix seems rather silly to me.
As for not working on non-linux, the only non-Linux systems who would possibly care would be Debian GNU/KFreebsd and Debian GNU/Hurd. Projects like FreeBSD have their own init system. But only one in a thousand (literally) Debian users use Hurd or KFreeBSD, so they are little more than toy projects, and it would be strange to me to seriously hold back Debian GNU/Linux because of them.
> The UNIX Way
I don't know what you mean here. systemd consists of a bunch of binaries working together, which is the Unix way. As for those binaries being developed as a whole in the systemd project, that is the same way the BSDs develop their core distribution. The BSD are the Unix heirs, if anybody are. How can that be in violation of some undefined "UNIX way"?
> read the handbook
This can't be emphasized enough. There are sooo many Linux people converting to FreeBSD yet aren't referring enough to the handbook and aren't used to excellent documentation and, in partricular, consistency not found in Linux.
On certain OS's reboot and shutdown are actually two very different things, and shutdown -r uses reboot to accomplish the goal...
Specifically, on FreeBSD running shutdown -r now
will run all the appropriate shutdown rc files such as /etc/rc.shutdown ^1, whereas reboot does not do so. If you rely on rc.shutdown to correctly shutdown various processes, initiate failovers, or anything along those lines, you are going to have a bad time when you use reboot.
Since nobody else is going to be helpful.
I don't get why everybody's so quick to shoot you down for trying to learn this stuff. Everybody starts somewhere. Don't get discouraged.
Are you sure you don't mean which
? In any case, you've already said how that's implemented. For each directory in PATH, enumerate all the files in that directory, and if you find one with a name that matches and which is executable, stop and print the path+name.
To find free space, you want <code>statfs()</code>.
Give Freebsd a try and find out.
Ports are like Debian/Ubuntu's apt-get but ports build applications from source instead of binaries. (FreeBSD has packages which can build binaries).
With ports it may take awhile to setup but you can have a very lean highly optimized system.
Once you figured out ports I would recommend learning about Jails.
Nice find! The wordlist I have on my laptop doesn't include any 11 letter one line QWERTY words, but it does have four 10 letter words: "perpetuity", "proprietor", "repertoire" and, of course, "typewriter".
Edit: I downloaded a bigger word list (the one that comes with the FreeBSD operating system, http://www.freebsd.org/cgi/cvsweb.cgi/src/share/dict/web2) and found three 11 letter ones: "proprietory" (seems like a weird spelling to me, but Merriam-Webster has it --defined as proprietary :), "proterotype", and the one you mentioned, "rupturewort".
That word list also had more 10 letter examples:
"pepperroot", "pepperwort", "perpetuity", "pewterwort", "pirouetter", "prerequire", "pretorture", "proprietor", "repertoire", "repetitory", "tetterwort", and "typewriter"
The term "bike shed" was introduced into online discussion as described here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING -- very much from the open source community.
ACLs have been available in UNIX for a long time.
Moreover, ACLs are simply an elaboration of the user/group/other permissions that have been available in UNIX since the 1970s.
Also, if you want UNIX because... Fuck, I don't know. I guess there's a difference, but I will leave that up to you to explain.
Anyway:
It leaks memory by calling wordexp(3) without equivalent wordfree(3) call. See the manual page for details.
If you do add locale functionality don't bother with the global locale. Just make the user pass in locale objects to specify the locale, and they can manage getting the global one if they want.
I guess this is a C library so you'd use something like xlocale.
I can make public any of the multireddits if anyone wants. The tab with the red icon is some FreeBSD architectural documentation, the OS being a pet passion of mine. I don't even do any development, I just like reading about it.
strcat, in general, can be dangerous. Some recommend never using, and it uses strncat, or even better strlcat, if it's available on your platform.
To use pfSense to its full capability you do need at least 2 NICs (or 1 NIC that is VLAN capable, and a VLAN capable switch) but for just running DNS and DHCP you can run pfsense just as an appliance. But seriously, if you have an old server which has 2 (supported) NICs or the capability to add extra NICs to an existing PC, it's worth it. You'll be hooked.
Back in 2000 I've been running a wireless bridge with two old Toshiba laptops. That was very reliable. It never went down for about three years because of the built-in UPS ;) I guess, it depends on how much the fan is running. Those are usually the first things to give up, so maybe run it with the lid open and in a cool place and I don't see why it should die prematurely.
I usually have a noname USB-3.0->LAN adapter in my backpack, that uses an ASIX AX88179 chipset according to dmesg. I'm getting about 350Mbit/s with iperf on a USB3.0 port, about 180MBit/s in both directions when measuring using -d. That doesn't differ much for a USB2.0 port. It should be supported by the axge driver under FreeBSD.
Are constant snapshots and sends any better? If you need something that's responding that quickly, you're probably going to want to roll your own syncing using something like auditpipe to monitor for writes and sync the changed file. This mailing list post has an example on how to follow the audit log.
Linux emulation is possible for x86 programs on FreeBSD and OpenBSD. Never used it with OpenBSD, but FreeBSD's has a nice chapter on it:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu.html
I've used it to run flash inside Firefox before, but I don't use Flash anymore.
> The package system is not like apt. Most of the packages are through "ports" ... compile and install the packages
Most users should probably be fine with the official package repositories and pkgng. pkg install foo
, pkg upgrade
, pkg autoremove
, pkg search
and so on - very apt-like.
linprocfs isn't used in BSD userspaces, it's used by Linux userspaces. It's a major component of FreeBSD's Linux binary compatibility layer.
And /proc clearly is portable because Hurd and kFreeBSD both support it. And sysvinit itself is clearly portable because even without /proc, the only part of sysvinit that won't work is killall, which Debian doesn't use anyway (Debian uses psmisc's killall, which also uses /proc, and also works on Hurd and kFreeBSD).
Actually, FreeBSD runs Linux binaries just fine. It actually runs them better than Linux does.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu.html
http://www.phoronix.com/scan.php?page=article&item=linux_games_bsd
BSD also has a linux 'binary compatibility', anything you run on Linux can be natively run on BSD with no code revisions.
Also, YES ports is a repository if you will, it differs in the fact that software is actually COMPILED on your machine when you 'install' it from the ports tree.
It's really quite interesting, if you're looking for a prepackaged setup, try pkg_add.
When it works, it's great.
The disadvantages of rc-based inits (please correct me where I'm wrong):
It's processed serially. This could be changed (say: xargs or other backgrounding of services), but AFAIK all extant scripts for any practical purposes execute serially.
There's no inherent process monitoring. SysV init has the same problem, it's one of the key points I'm trying to address.
It's based on a single file model which makes it difficult for packages to update that file. With SysV init, a software package can drop a discrete file into /etc/init.d/ and create the requisite /etc/rd?.d/ symlinks. My proposal would operate similarly. Upstart functions similarly with /etc/event.d/. As I recall, you're testing whether or not to start any of a set of known services.
Individually starting and stopping services is not as straightforward as SysV init or Startup. My read is that FreeBSD now includes an /etc/rc.d/ directory to facilitate this: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-starting-services.html
Wow, my mod inbox was full today! I'd like to point out that FreeBSD distributes its software via FreeBSDMall - http://www.freebsd.org/where.html, which in turn helps to support the effort. It's no different nor is it bad. Part of me wishes I had been collecting these discs since I first got hooked (2001). :)
I think FreeBSD would probably be fine, but I agree that turnkey-type solutions like FreeNAS or pfSense would not be the way to go, if your goal is to learn.
> I don't understand half the things I've read about mdadm and it's command fonctions.
A lot of unix admin stuff involves getting comfortable with manpages and command line tools with a lot of options. Spend a lot of time in the dos, and don't be afraid to mess up and have to reinstall.
The FreeBSD Handbook is a great resource for learning the basics of administration.
Last sentence: "Selecting [ Install ] here will enter the installer."
Just hit Return/Enter on your keyboard. Spacebar selects/unselects options, keyboard arrows move you around. http://www.freebsd.org/doc/handbook/using-bsdinstall.html is the installer tutorial.
Well, FreeBSD and Arch Linux are nearly as difficult .
FreeBSD'S /etc/rc.conf and Arch's one just change the sintax, the purpose is the same.
https://wiki.archlinux.org/index.php/Rc.conf
http://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5
Not sure where you got those, neither is even close to the MD5-Crypt algorithm (all crypt output starting with $1$). The original implementation can be found here. It uses a complicated series of ~1000 compositions of the md5 hash function; using previous digests, the password, and the salt as input, with 5 or so alternating permutations of the order.
As well, if you are going to use something like a single round of a hash, the design of HMAC may be useful for understanding how salts & passwords should be combined securely. (re: hmac, think of the salt as the message being signed).
FreeBSD 1 was released in 1993. You may be thinking of Darwin, which was publicly released in 2000: MacOSX Public Beta
The best documentation and worked example I know of is FreeBSD. It has, by far, the best commented configuration files for BIND. Have a look at the handbook pages for DNS and BIND.
I'm a massive fan of the FreeBSD Handbook. I think I taught myself not only FreeBSD, but basic Unix sys-admining with that handbook. Really makes me appreciate great examples.
I'm late to this thread, but you can use mdconfig to create file-backed md disks, which you can then use to play around with zfs and zpool. Create arrays, examine upgrade paths, etc. It's a very good way to experiment with your intended setup without actually purchasing or stressing hardware.
I'm in a similar boat, but have some bit of experience with FreeBSD. I'm an everyday Arch user as well and recently used FreeBSD as a DNS server (BIND9) and enjoyed myself. Their handbook is wonderful, but does assume a certain level of knowledge. As you plan on using it as a server, read into their implementation of jails and I'd suggest reading into user experiences with the services you choose to install. Ports is a great system, and if you've used Arch's AUR, you should have a leg up on how things function. No yaourt (or similar tool) here, but it works similarly.
You're probably familiar with Bash, so the shell will take a little bit of getting used to. I still miss some of the features when I'm on my Linux boxes.
I'd still be using FreeBSD, but I wanted a server that could handle virtual machines (I use KVM), so I migrated back to Linux. As my experience was short (about a month), there's really no practical knowledge that I can pass on beyond reading that handbook and keeping a log of your activities on the server. Keeping that log really helped me organize my thoughts and keep track of my activities.
Have fun!
No, because, technically, ZFS isn't allowed to be included in the kernel, so it can't be redistributed by distros. ZFSs license, the CDDL, isn't compatible with the GPL or the GPL isn't compatible with it. Take your pick.
If you want a out-of-the-box ZFS root then give FreeBSD a try.
-CURRENT is the development branch and isn't intended for casual users, or anything but developers and testers really. To quote the handbook:
> FreeBSD-CURRENT is the “bleeding edge” of FreeBSD development and FreeBSD-CURRENT users are expected to have a high degree of technical skill. Less technical users who wish to track a development branch should track FreeBSD-STABLE instead.
-CURRENT is randomly broken(won't build), has experimental code which main not exist in future -RELEASE builds, and has all sorts of fun errata.
To answer your last question, "cat /etc/services".
n@ubuntu:~$ cat /etc/services # Network services, Internet style # # Note that it is presently the policy of IANA to assign a single well-known # port number for both TCP and UDP; hence, officially ports have two entries # even if the protocol doesn't support UDP operations. # # Updated from http://www.iana.org/assignments/port-numbers and other # sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . # New ports will be added on request if they have been officially assigned # by IANA and used in the real-world or are needed by a debian package. # If you need a huge list of used numbers please install the nmap package.
tcpmux 1/tcp # TCP port service multiplexer echo 7/tcp echo 7/udp discard 9/tcp sink null discard 9/udp sink null systat 11/tcp users daytime 13/tcp daytime 13/udp netstat 15/tcp qotd 17/tcp quote msp 18/tcp # message send protocol msp 18/udp chargen 19/tcp ttytst source chargen 19/udp ttytst source ftp-data 20/tcp ftp 21/tcp fsp 21/udp fspd ssh 22/tcp # SSH Remote Login Protocol ssh 22/udp telnet 23/tcp smtp 25/tcp mail time 37/tcp timserver time 37/udp timserver rlp 39/udp resource # resource location nameserver 42/tcp name # IEN 116 whois 43/tcp nicname tacacs 49/tcp # Login Host Protocol (TACACS) tacacs 49/udp re-mail-ck 50/tcp # Remote Mail Checking Protocol re-mail-ck 50/udp domain 53/tcp # Domain Name Server domain 53/udp
> No mention of ubuntu....because y'know it is the only distro....
> Lol I used to run ubuntu but I wanted to play games without hassle so I am currently on windows, although this machine will be becoming a linux machine or a NAS (running freenas so linux) when I build my new PC
FreeNAS runs on FreeBSD which has no assoceation with Linux other then they are Unix-like.
>packages need to be compiled on free sd
FreeBSD has a binary package manager now. You can still use ports if you want/need to, but it is not required.
To be fair, I think Java (for all its woes) is much more portable than .NET. It does run on Windows, Mac, GNU/Linux (even the BSDs apparently) as well as on Android (more or less).
Even other interpreted languages like Python, Ruby, PHP, etc. are ported to most of these platforms.
I also suspect that while many applications that run today are written in .NET − at the same time, Internet Explorer 5 and COBOL still live to this day, so that's probably not a good measure of whether something is struggling or not − the growth rate is probably slowing down fast.
It will probably take a few years at least to really feel the effect on the .NET ecosystem, but I do think it is struggling.
In a long term you are gonna suffer 250GB is like 232 actual usable space, on top of that PS4 OS reserves 8% of that for it's use (if not more) http://www.freebsd.org/doc/faq/disks.html#disk-more-than-full
> LGPL is most probably just like any other "free" license.
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/bsdl-gpl/index.html
All-n-all, I'm just glad to see something like Clasp to come into existence, licensing (and reddit's collective butthurt) concerns aside.
On FreeBSD, you boot totally diskless (you don't need a local drive), you usually don't need anything except DHCP-Daemon which points to where to load PXE bootcode from. This is normally a TFTP-Server (yet TFTP, not FTP!) where you can download the kernel from. PXE boot will try to mount bootfs or rootfs where /boot is also on the filesystem from an NFS server. After finding the boot part, the usual /etc/fstab does the rest.
More about it on: diskless(8) or in the Handbook
(Also, watch how cool they solved varying configurations and how almost everything works out-of-the-box after the generic setup.)
Edit: You can also have /boot on your disk or USB thumbdrive. You just need to tell the loader where to mount root from. This is done in loader.conf with vfs.root.mountfrom.
[edit bsd] seems like on linux the ownerr iptables module should be able to do it eg (WARNING: UNTESTED):
iptables -A OUTPUT -m owner --cmd-owner firefox -j MARK --set-mark 11 ip route add table 11 via 10.0.0.1 dev wifi1 Or you could use a different network namespace for that one app and bridge that network namespaces vethernet device with the wifi nic.
On BSD: With pf you could match based on the user name. So you could setup a seperate user and run a second webbrowser as that user.
I actually tried doing this for an import framework I wrote and tweaked the batch size back and forth. The golden number is 300 batch rows, after that the query starts slowing down again. I never bothered to write it down with multiple measurements though. And who knows, maybe ministat would have told me to fuck off and go do something more productive if I entered the data.
Seriously, I like FreeBSD very much, but I don't like this book. It's better to read the online Developer's Handbook and the sources in /usr/src.
And remember, all this is about FreeBSD and not about operating systems in general. Check the materials students get at universities to know about useful books.
It is also advisable that you learn C first, because FreeBSD already uses pretty advanced concepts. And by learning I mean: write a lot of code and read a lot of code. Don't just read about it, do it. Make useful stuff that improves your life and what you really like, it's the quickest way you to feel rewarding success with your own programs.
i doubt 8.x has the new (borked imho) installer. This would be the original installer and hence maybe why it's not updated. Correct me if i'm wrong.
e: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install-start.html
Not sure why he would though, there's a plethora of options that handle just that use case already. It's one of the simplest tasks any sort of production server needs to handle.
> But honestly, I don't yet know how to do that and how to apply this change permanently (so I don't have to re-execute those commands after each restart).
/etc/sysctl.conf
See man sysctl.conf
Also, I would encourage you to update these systems to atleast 8.4. 8.3 is no longer supported by the community. The 8-STABLE branch is legacy now. I'm not sure how long it will be supported as well. You should be planning on upgrading or replacing these VMs to the latest production release (10.0) soon.
Nope:
The biggest gripe with using SSD with ZFS was a lack support for TRIM call. This was added in FreeBSD 10, not sure if it propagated to outside of it yet.
> In a GPT, the first sector of the disk is reserved for a "protective MBR" such that booting a BIOS-based computer from a GPT disk is supported, but the boot loader and O/S must both be GPT aware.
> On systems with BIOS firmware, the MBR is still the first chunk of code that the firmware loads to initiate the boot process.
And FreeBSD:
> gptboot is used on BIOS-based computers to boot from a UFS partition on a > GPT-partitioned disk. gptboot is installed in a freebsd-boot partition > with gpart(8).
No worries, both Vmware workstation, VPC, and VirtualBox default the network adapter to NAT I'd assume for security purposes. I will say the other question you could have found much quicker just by looking at the handbook, I've spent plenty of time helping on work on it so please use it :)
I have a boot drive that hosts the OS and programs.
I then have 2x1TB and 2x2TB. one of the 2TB had all my data on it... so I hooked up "1tb1" and "2tb1" and created a zpool:
# zpool create mypool 1tb1 2tb1
I now have a striped zpool on which I can host files. But you want to create a ZFS explicitly! I created a ZFS:
# zfs create mypool/mydirectory
I rsync'ed all my data from 2tb2 (hooked up to a linux server) to the zfs.
After I have everything moved, I hooked up 1tb2 and 2tb2 and added them to the zpool. The "attach" subcommand of zpool adds a drive as a mirror to an existing drive in a pool. The "add" subcommand adds a drive as a stripe.. or so I think. I also haven't played with RAIDZ much, or how these commands work with RAIDZ.
OK. So to attach the second set to the pool:
# zpool attach mypool 1tb1 1tb2 # zpool attach mypool 2tb1 2tb2
Now, I have the following config:
# zpool status //will show something like the following:
mypool mirror-0 1tb1 1tb2 mirror-1 2tb1 2tb2
So I have a 3TB pool with mirror level redundancy.
Resources:
I found it almost too easy to setup - seemed like I was missing something. I went for a FreeBSD configured as a NAS because of my Unix background. If you have a Unix background, you don't need my help - really, it just works. Read the FreeBSD Handbook (it's not that big) and go for it. If you don't have a Unix background I'd suggest you look at FreeNAS which is purpose built NAS solution using FreeBSD and ZFS. I don't have much information on FreeNAS because I decided not to use it.
About the only gotcha I can think of is the naming of the install images... you will almost certainly want the amd64 image - it is for both Intel and AMD 64-bit processors. The ia64 is specifically for Itamium processors. The install was as easy as dd^* the image (link above) to a USB stick, boot from USB stick and follow the prompts.
Google "zfs cheat sheet". There are lots out there and I found it the best way to learn how to use it.
* Assumes you have access to another Unix based machine. There are Windows alternatives, I just don't have the details as I didn't need them
Sure. http://www.pfsense.org/ is where you find it. It's a router and firewall based on FreeBSD (http://www.freebsd.org/). pfSense offers three options for VPN connectivity, IPsec, OpenVPN, and PPTP.
I've used it for 5 years at work and it's rock solid, no problems what so ever during these 5 years. I run it on a very basic PC (core2duo, 2GB RAM, Asus motherboard) with two Intel Gigabit NIC (http://www.intel.com/products/desktop/adapters/pro1000gt/pro1000gt-overview.htm).