Slightly offtopic (maybe) but... oh well
It's still the weekend
Another strange question: where it's taught about this?
I honestly don't know. But the thing is, I'm pretty convinced that a lot of us here gained most of our expertise through experience. I've been using Unix since the 90's, almost continuously (more or less) and I've done a lot of weird stuff over the years. That has seriously helped me to gain the experience I have today.
Word of the wise though: don't try to "learn Unix". Why?
Well...
Code:
unicron:/ $ ls -l bin | wc -l
46
unicron:/ $ ls -l /usr/bin | wc -l
477
unicron:/ $ echo $((46+477))
523
So that's
523 regular user commands available in the base system, so only counting FreeBSD. If I'd look into sysadmin commands (
sbin) or the 3rd party software (
/usr/local) when we'll reach even higher numbers.
You really don't want to try and memorize all that. It's a waste of time and effort.
Instead focus on key points. I've mentioned it several times already:
the FreeBSD handbook. Just start reading it. If you want to teach yourself something then at the very least study
chapter 3 which covers FreeBSD basics. That is basically the key here.
Become familiar with the basics of Unix. For example: know how file permissions work (
chmod,
chown,
chflags and
setfacl). That's from the top of my head, and I even hardly use the latter. Know how the kernel operates, for example stuff such as
kldstat,
sysctl and
kldload. Know how the boot process works, so roughly what's happening in
/boot (and
/boot/loader.conf in specific).
Be aware of
/etc/rc.conf but
also of the existence of
/etc/defaults/rc.conf which is just as important. And when you've discovered this realize the existence of
/boot/defaults/loader.conf, hmm, could that structure be related somehow?
So.. focus on the basics first. And for everything else? Simple: know where to find the information you're looking for.
man man
comes to mind (I'm not kidding here).
man -k <topic
is one of the most important commands to remember. Yes, you can also use
apropos but if you use
man
you'll also remember the existence of that command.
How to mount ext2 on FreeBSD? Does it even support ext2? Well....
Code:
unicron:/ $ man -k ext2
gnutls_privkey_import_ext2(3) - API function
ext2fs(5) - ext2/ext3/ext4 file system
fsck_ext2fs(8) - compatibility wrapper for e2fsck
ext2, ext3, ext4(5) - the second extended file system ext3 - the third extended file system ext4 - the fourth extended file system
fuse-ext2, FUSE-EXT2(1) - FUSE module for Second Extended File System
e2fsck, fsck.ext2, fsck.ext3, fsck.ext4(8) - check a Linux ext2/ext3/ext4 file system
mke2fs, mkfs.ext2, mkfs.ext3, mkfs.ext4(8) - create an ext2/ext3/ext4 filesystem
debugfs(8) - ext2/ext3/ext4 file system debugger
I think it does
You can then try
man ext2fs
to learn more (which points to
ext2fs(5)).
There's tons of information on Unix available right at your finger tips. You only need to look for it. Then give it a few years and you'll start to know several commands by heart as you gain more experience.
Simply put: there is no better teacher than hands on experience. There are tons of things which the books won't tell you but which are still somewhat common knowledge.
Trying to learn 100 commands from mind is fun, but it will probably only last you for maybe 6 months, especially if you're not using those commands on a regular basis. But if you make sure that you remember where you can look for the commands you need then you've taken the first big step.
Small example: It's been a few years but the very first time I dived into PowerShell (a very impressive Windows commandline environment) it took me approximately an hour or so to get my fingers behind the very bare basics (Get-Help, command profile (
$profile, Get-PSDrive, Get-EventLog (I really love this one), New-PSSession, etc.). And all because Microsoft were smart enough to make an alias by default which pointed
man straight to
Get-Help (and because the PowerShell documentation is actually quite good!).
For me 'Learning Unix' begins with doing
man man
and then working your way up from there.
Hope this can give you some ideas.