If you're new to C, read K&R.
Once you've done that (or if you already know C) then read THE book on Unix programming
Your machine is configuring its hostname via DHCP along with its IP address.
You can change this behavior in /etc/hostconfig.
This is a very broad question, so I'll just offer a few good books for some, and any of those things:
Advanced Programming in the UNIX Environment by Richard Stevens.
The UNIX Programming Environment by Brian Kernighan and Rob Pike
The Design and Implementation of the { FreeBSD, 4.4BSD, whatever BSD } Operating System by any combinarion of { McKusick, Bostic, Karels, Quarterman, Neville-Neil, Watson }
The Design of the UNIX Operating System by Maurice Bach.
Edit: oh, and about languages... it's mostly just C. So I guess if you need a book: The C Programming Language by Dennis Richie and Brian Kernighan.
There's also the experimental Rockbox for Android which gets you a host of cool stuff, like Breakout, Tetris, A Pac-Man emulator, Sudoku, Solitaire, Chess, Life and a Gameboy emulator.
nano is fine until you have to swap two lines. Anyway, vi(m) can be hard to grasp, but if you are up for a ~15 min read you should really check this out :-)
Learn the man page command. If you can talk your parents into it get this book https://jet.com/product/detail/04a2cb3bf5fe4020af5c189bd0c41a28?jcmp=pla:ggl:media_a3:books_computers_technology_a3_other:na:na:na:na:na:2&code=PLA15&k_clickid=09d6d2b4-f303-462c-9104-80c911a2178a&gclid=Cj0KEQiAwNmzBRCaw9uR3dGt950BEiQA... I am using it for class and it is great. Very informative, descriptive, and easy to understand.
Wasn't there a concerted effort at MSFT to make NT4 POSIX compliant so that they could seek certification?
The landscape was different then, but I seem to recall a story about it...
https://slashdot.org/story/01/02/06/2030205/david-korn-tells-all
Server OS: http://www.openbsd.org/60.html
There are 8570 sparc64 packages available, including media servers.
Great way to get started: https://ftp.openbsd.org/pub/OpenBSD/6.0/sparc64/INSTALL.sparc64
It's trying to boot from the network using RARP. It's possible there is no OS installed on the disk, or OpenBoot is simply defaulting to network.
If the disk is fine, you can likely obtain Solaris installation media from your friend or perhaps online.
You can alternatively try installing OpenBSD or NetBSD, their documentation is also helpful for booting from OpenBoot and setting up a server to handle network boots.
1984 I believe. My understanding is that there is a tight-knit relation between "The Unix Programming Environment" and "The C Programming Language". I'm studying both in parallel and it's quite engaging. When they sit next to each other on the bookshelf they look like they absolutely belong together.
Some of the books that got me working better were "The Unix Programming Environment" and "The C Programming Language." Don't be turned off by material just because it's "old" - old in Unix tends to mean it is applicable more universally and is better documented. But that doesn't mean don't keep up with current standards. Hell, I first learned how to use vi (and ed) on linux from a book printed in 1988.
Another couple of fun books filled with little tricks (easy to jump around) are "Linux Server Hacks" and "Unix Hints & Hacks."
Having some exposure to programming is also good for a sysadmin imho, even if they aren't a full on "developer." More is always better here, but at least being able to put some scripts together and/or complex command lines is pretty key to saving a lot of time. At least something like bash, python, perl.
Google is the best, but I thought this was a nice resource too, especially for more core fundamentals: Unix Guru Universe
Yyyy, you need source (and a lot to learn), in /usr/bin are binaries.
cd is built-in command in the shell, bash in OSX I think.
source for other commands (from GNU/Linux, these from OSX are closed source, or BSD, don't know) can be found at this site.
> Linux moved over to using systemd. While that's a can of worms, the fact remains it is much faster at bootup than FreeBSD's scripts.
Depends upon what you mean by "Linux" exactly - Slack still runs traditional initscripts, while Gentoo uses OpenRC as the default init, which layers features on top of initscripts (to the best of my understanding - not a Gentoo user).
"Desktop Linux" (the Ubuntu/Mint/Elementary family, as well as OpenSUSE/Fedora) definitely has jumped on the systemd train, though.
> Linux has better support for virtualization tools like Virtualbox and Qemu, although those do run on FBSD as well, without IOMMU/PCI passthrough etc etc.
I wasn't aware that FreeBSD was any less capable than Linux in this area (which is probably more a statement about my ignorance than your post) - I thought it was OpenBSD that suffered in this area since the project leads there thoroughly detested virtualization.
> it might just be a incompatible gpu
That's possible. Do you know what GPU you have installed right now? There were a few options available from Sun when that model was first produced. Check here under "Current Status" for a list of OpenBSD compatible GPUs for your system. If yours is on that list, it may need tweaking in the xorg.conf file, otherwise you may have to switch GPUs or just deal with low resolution/colors. Also see Frame Buffers -> PCI Video under Supported Devices on the same page to see details of that support. It looks like most of the PCI cards that would have shipped with the workstation support 24-bit color, and a few of the SBus cards as well.
Well, for starters, OpenSSH, the free SSH implementation of record, which this is intended to replace (in certain usage scenarios) has a BSD-style license.
Licenses give users certain permissions and obligations. Those permissions and obligations differ between different licenses. So if your operation/business/whatever is designed to account for having the permissions and obligations that license FOO gives you, suddenly switching to the different set of permissions and obligations that license BAR gives you might not be so simple. At the very least, if you're running a business, you'll probably have to pay a lawyer to run this by them, and you wouldn't have to do that had the license stayed the same.
For a less polite response, see here. (NB: The makers of OpenBSD are also the makers of OpenSSH.)
His point is that nothing about using MacOS on a day-to-day basis will cause you to learn about Unix. You can use it to do so, but it's too easy to avoid.
Also, I use a Mac on a daily basis, mostly in the command line, and I haven't touched Terminal.app in forever. iTerm2 is so much better. Maybe Terminal's not the piece of crap it once was. (That said, even then, it was ten times better than the shit that Windows provides as a terminal.)
> I currently use zsh with oh-my-zsh, zsh syntax highlighting and thefuck.
I also use antigen because I find it simpler to use. You just edit a few lines in .zshrc and done!
> One good thing is that fish is nice enough to tell you what it doesn't like, and in many cases will tell you how to fix it.
Yes, I like that feature from fish just as I like the way completions work. Plus, it comes with many features of zsh plugins out of the box.
> I guess you really need to ask yourself what zsh is lacking, and if fish has features that will be meaningful to you in your workflow.
I could say for sure that I would have jumped to fish if there was no zsh, but the advantages of fish is that it simply works: just install fish and edit the configuration file, done! That means it's easier to use in remote computers.
Anyway, the real reason I'd like to check newer shells is to see if I can make my work in the terminal easier: just like zsh is miles better than bash, there are still features that zsh lacks… better parallel support, more informative top (not text heavy, more like htop), better text styling (including using images) and printing an image (even videos?) to the terminal without opening a X window.
How much are you willing to do yourself?
Gentoo is the "grow your own down to starting with the seeds" distro. You're handed pretty much nothing and start with some documentation.
If you want to do gene splicing and start from bits and ends, try Linux From Scratch -- it's pretty much "here's source, go build things."
If you want something a little easier, try Arch. It's easy enough to get started. It enforces some choices (SystemD has been in the main tree for a long time and people have been working hard to get init scripts moved over to SystemD units.
However, for UNIX, I'll suggest NetBSD. It's light, uses Ports, has nice support.
You might take a look at Lynis, which does automated security assessments like that.
You could also look at the OpenSCAP tools for Linux, which have templates based on the NIST hardening requirements to show which controls are in place and which aren't. They're a pain to customize, but provide a good starting place for auditing tools.
Red Hat is by and large what is used in most business and enterprises for Linux. I suggest learning on CentOS (www.centos.org), which is based on Red Hat and you don't have to worry about licensing. Fedora is great too, but CentOS will be like RHEL.
I suggest starting out with this tutorial, and then start studying for Red Hat certification -- http://www.tutorialspoint.com/unix/
This is a great book. It covers Red Hat 6, but Red Hat 7 just came out last week. I suggest learning the basics with that tutorial and then by the time you're through all that material some Red Hat 7 books might be out. http://www.amazon.com/RHCSA-Linux-Certification-Study-Edition/dp/0071765654/ref=sr_1_2?ie=UTF8&qid=1403118474&sr=8-2&keywords=red+hat+7
I've been a Unix & Linux admin for 6 years, and I've worked in I.T. for 22 years. I mostly work with Red Hat and Solaris, but I also work with Debian/Ubuntu and open/SUSE at times. I've taken Red Hat training classes, and have a lot of experience with it. However, my big thing has been Solaris. I'm actually certified in Solaris 10 & 11. If you're trying to get your foot in the door though I would recommend starting with Linux. Solaris is a true Unix OS, and there are a lot of differences. Also, most businesses are moving more towards Linux these days, which is unfortunate because Solaris 11 is years ahead of Linux.
Or put a direct link to the latest version of the PDF on that first page? The only way I can see it is if I copy and paste "https://gitea.com/CasperVector/up2020/releases", or click on releases at the top, then download a zip or gzip file...
Update: I was able to find the solution to my problem here: https://groups.google.com/d/msg/k12appstech/5o7xK2IX_ug/MN0u-txMVa8J
I'm not able to get the login script running yet, but everything else works fine. :)
Eh, well you're not going to replace the Mac interface, or finder, but you can dress it up a little by cobbing together some applications and scripts to rice it up a little.
https://github.com/koekeishiya/yabai/blob/master/assets/screenshot.png
Or you could try your luck with running an x11 server in a container or something, then rigging the display by ip through xquartz. Running something native in macos would take a lot of compiling from source or ports. Doubt you'd get gnome or kde running these days but maybe wm2 or dwm? 🤷♂️
VirtualBox link. Free software, work great. Linux is a Unix-like OS, might ask your instructor if you'd be able to complete your assignments using it. macOS is also a Unix if that's an option for you.
> GNUs don't refer to themselves as such either
Debian, a very influential project on which many others are based, does:
> The FSF explicitly requested that we call our system "Debian GNU/Linux", and we are happy to comply with that request.
Also:
> it just calls itself Arch
I meant in branding and/or documentation. Arch calls itself GNU in its Wiki:
>Arch Linux is such a GNU/Linux distribution
Furthermore:
> BSD wanted to distance itself from the restrictive OS that spawned it
Then why not respect their wishes? It's OK to appreciate an OS on its own without the need of a family tree.
I use ghostscript for that:
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="small.pdf" big.pdf
There very well may be a better set of flags for this, but it's what I've been using for awhile and it's worked well for me.
You might supply a sample of your command.
The only keyword "link" found in the cpio man page:
'-l, --link' Link files instead of copying them, when possible. '-L, --dereference' Copy the file that a symbolic link points to, rather than the symbolic link itself.
Edit: maybe helpful, doubtful: http://superuser.com/questions/181298/unable-to-preserve-hard-links-why
Edit 2: Please do post if you figure it out, or PM, whichever. I'll be bold and ask, are you making a front-facing, www-based server build or heaven-forbid a gateway box? Sometimes those can be pretty tricky when limiting your binaries/etc. as much as possible.
You could spawn a process, note it's PID, then signal it when you need to, using:
>kill -n $PID
Where n is the signal number.
Nodejs should have the capability to handle it:
That would be correct, see my /edit2
.
From: https://directory.fsf.org/wiki/Pdksh
>'PD-ksh' is a clone of the AT&T Korn shell. At the moment, it has most of the ksh88 features, not much of the ksh93 features, and a number of its own features. It is quite portable and should compile easily on any *nix box. The vi editing mode is better (as per the developer) than that of ksh88 or ksh93.
IMO the OpenBSD guys wouldn't have made many - if any - feature changes, based on their history of software engineering.
I haven't tried Solaris within VirtualBox, but I know Ubuntu works well there. For your purposes, any flavor of Unix should suffice, so go with whatever's easiest.
Another option: for $5/month setup a little Unix server in DigitalOcean and connect to it with an SSH client. I like Ubuntu there as well. https://www.digitalocean.com/
Also, search the web for "unix primer" and read a few of those guides.
If you REALLY want to know how thinks work under the hood, I recomend you http://www.linuxfromscratch.org/lfs/
It will be challenging and sometimes frustrating, but once you overcome your frustration, you will be very happy when you see that pesky little login prompt.
Use runit or daemontools.
Quickstart:
mkdir /etc/sv/tool echo 'exec program' > /etc/sv/tool/run chmod +x /etc/sv/tool/run ln -s /etc/sv/tool /service/tool # use /etc/service for runit
You can find nearly anything on YouTube, but quality and it can take a while to filter through some of the garbage.
As far as paid stuff goes, I think CBTNuggets is one of the top contenders. Their CompTIA Linux+ class is great.
What about it? If you want to see the questions look no further than the original source. You might want to check some older revisions, but I don't believe that anything's changed in the last fifteen years or so.
In addition to the other one mentioned, links is pretty awesome—with a no-frills web presence to match.
I used it for years as a text-only browser. Relatively recently I checked out graphics mode (the -g flag), and it works well where I need it.
You can't do this with Alexa, as many have explained already, but you could try something like Mycroft. There's open-source alternatives out there that will handle the actual request processing on your end, but you'll need something to host it. Alexa devices are just listening devices, they're not designed to do their own processing and they're entirely dependent on Amazon's servers.
You could do this on a mac with docker and full-screen windows in spaces.
The same could be achieved on Linux or a BSD with chroots, jails or containers and possibly nested Xorg sessions.
Qubes OS uses isolation concepts similar to what you describe in the interest of security.
I second tmux. also on my windows drive i use a program called mobaxterm which is basically tmux + sftp/scp. Windows home version can be found here.
Or, look at asciidoc/asciidoctor:
I'm a relative newcomer to Tarsnap, but am already a huge fan.
I funded my brand-new account over two months ago with $10 and my current balance is: $9.368557018353598117.
It's incredibly geeky, but the instructions on the website (particularly the general advice, tips, and examples) are very good. What I love about it is:
I also back up to a NAS (Synology), but I feel way more secure with Tarsnap and when I make a mistake and need a file back (it happens!), I use Tarsnap to recover it, mostly to prove to myself that I can.
This isn't exactly clear. A specific four letter word or a generic four letter word? Or four characters separated by spaces? Or separated by a comma?
In the simplistic case, you could do " [a-zA-Z]{4} " -- assuming the word is separated by spaces. That would match any combination of four upper and lower case letters surrounded by spaces.
The dots you have match any character, not just letters. It will also match numbers, punctuation, spaces -- anything but EOL & EOF basically.
This site:
Will help you figure out your regex.
Good luck on your homework.
It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!
Here is link number 1 - Previous text "vi"
^Please ^PM ^/u/eganwall ^with ^issues ^or ^feedback! ^| ^Delete
What have you tried? Have you looked at the documentation for the for statement? Have you tried writing a program that just prints the numbers 1 to 100?
I would really advice you to try both. I tried emacs and didn't really like it even though it was my first choice after reading about it online. Couldn't really remember the keybindings that well and other things. But really just try both, I think a nice emacs distro will make it easier to try out. I could recommend Emacs-Doom to me it seemed faster than Spacemacs, but again try out yourself.
Well, for expediency, you can use grep -F '. ' /path/to/file
, but I have a feeling that your professor probably wants you to get familiar with the regex engine, which is explained by running man 7 regex
or available online here. You can play around with Regular Expressions ("regex" or "regexps") using a site like this, it's not perfect, but it'll visually break down what an expression means.
To provide a regexp that could work, you may want something like: grep '.\\.\\ {2,}' /path/to/file
Breaking this down we have the following:
* .
a period means "match exactly one character"
* \\.
the \\
is an escape character, so this means a literal period
* \\
this is a literal space character
* {2,}
this is a quantifier, the first value is the minimum number of occurences of the previous token, and the second value is the maximum. In this case it means "two or more spaces"
The regular expression is surrounded in single quotes ('
) to prevent the shell from performing any transformations or interpretations on it before passing it to grep(1)
.
Hope that's enough to get you started.
And, at the time at least, rightly so. "Why didn't they use Linux?" Because the Linux kernel has been a joke of a mess for decades, and certainly 25 years ago it wasn't even remotely a reasonable thing to use commercially.
For all of Windows' user-facing faults - and it has many fewer now that it did decades ago - the NT kernel isn't one of them. The NT kernel is more like VMS than Linux (surprise surprise - Dave Cutler is responsible for that too), and has always been remarkably rock solid.
I highly recommend the book Showstopper about the creation of NT.
Text Processing and Typesetting With Unix has I think a chapter on usage. I can't find my copy at the moment, but it's probably similar content to that in the Formatting and Typesetting book you've linked to.
> If yes, how could have all these OS be inspired by it if they don't know how it worked ?
Even if you had no access to source code (and I would argue than even better than source code), there were books that explained at the smallest detail how the unix kernel worked, from the filesystem cache to the scheduler algorithms.
Notably this classic by Maurice Bach,
https://www.amazon.co.uk/Design-Unix-Operating-System-Maurice/dp/9332549575
"The Unix Programming Environment" will give you useful background information if you're not familiar with Unix or Unix-like operating systems. That should prove helpful when you get to the Input and Output chapter in "The C Programming Language".
I dont know off the top of my head the OSX equivalent of this command, but in linux, there is the strace command that lets you see the system calls that are being made in the process of running an executable. Its very dense information but there are parameters that will let you filter the syscalls.
In general though, things like /bin/cd are coded in C, which means they are translated from source code into binary cpu instructions. You can use objdump -D (on osx, whatever the clang equivalent is) to disassemble the binary into human-readable representations of machine code, but this is still doing it the stupidly hard way, since just reading the source code is already hard enough to get useful knowledge out of.
Im not sure how experienced you are with C, but learning how /bin/cd works requires knowledge of the C programming language with a good familiarity with how posix system calls work and the c library.
The really simple answer for how /bin/cd works? the command takes arguments for what directory to switch to, and then calls the chdir() system call, which requests that the kernel make the program's current working directory the one in the argument. This is all implemented In the shell program you are using.
Lets just say you scratched the tip of a very huge and interesting iceberg. I say go knock yourself out reading source code and trying to figure things out.
If you want to learn about system calls, I would say that the undeniably best source of information for that is The Linux Programming Interface by michael kerrisk. For c programming, I couldnt really reccomend a good book because I learned it peicemeal from tons of places and no book really does a great job at it.
For administration, read:
https://www.amazon.com/UNIX-Linux-System-Administration-Handbook/dp/0131480057
For programming, read:
https://www.amazon.com/gp/product/0321637739/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
I purchased this book it seems it was last updated and revised in 2002. So i guess it may be a bit outdated for what I want to do.
Should I perhaps pick up a different book? Or is there a better web based resource I should be getting into?
Back when I was a kid, I liked Unix for the Impatient. Or the rabbit book as it was known. Of course the UNIX System Administration Handbook was also a great deal of help.
If you learn vi, I'd stress to not use the arrow keys, but rather ijkl, it'll greatly improve your speed, and make you look cool. As always in this brave new world, if you want to try something dangerous and fun, use a Virtual Machine. Don't trash your base machine. And don't login as root!
This is a good book. You should supplement it with something like this because one of the big things about UNIX (and its derivitives) is the underlying philosophies around processes, files, and CLI tools.
I would heartily suggest putting linux on a PC (any old PC from the last decade will do, honestly) and learn by playing around on it. Ubuntu, Fedora, any free version will do. You could also do this in a VM on your windows or mac.
For those pushing OSX -- yeah, it's got UNIX/BSD under the covers but there are also a lot of differences you have to dig under to get to a "plain" UNIX environment with X11 etc. (I've been playing with UNIX on mac since the Mac II, understand this isn't linux prejudice talking). It'll be a lot easier to install a linux variant fresh somewhere.
If you're looking for a book I highly recommend Unix Shells by Example:
I like it because it's light on the banter and explanation that's so common with tech books, and heavy on the examples. It's had a permanent spot on my work bookshelf for the last 10 years