Introduction to unix¶
Unix is a large family of operating systems that have historically been a haven for systems programmers. No matter what operating system you use at home, school, or work, anybody who spends much time programming or working on computers can benefit from being comfortable working in a unix environment. My goal in this course, and in this chapter, is not to convince you that unix is the best—there is no best for everyone in all circumstances—nor to make you a fluent power user of some system in the unix family. My goal is this.
The next time you are asked to sit down and do some work in a unix environment, you’ll be comfortable getting started.
Trying a new environment is a challenge no matter what it is, but one thing that makes unix environments scary for people used to, say, Windows, is the greater reliance on the text-based command prompt. Windows and macOS are very different from each other, and switching between them can be a pain, but they both encourage the general user to stay in a graphical mode with similar metaphors about windows, icons, menus, and a pointer. Unix systems have had a similar graphical environment since 1985, and Microsoft had a successful text-only operating system before Windows, so this isn’t an actual hard line between the kinds of systems. However, unix embodies a unique perspective that makes text—and text-based interfaces—particularly powerful.
Ubuntu provides a pretty good article on the Linux command line for beginners you can use to get started.
Because we will be using this environment in the traditional way—multiple simultaneous users, signing in from all over and sharing one central computer—there will be some differences from what the tutorial asks you to do.
In opening a terminal, the tutorial talks about opening a terminal window from a graphical interface. Replace that part with simply logging into the server with ssh.
In creating folders and files, the tutorial asks you to make
/tmp/tutorial
. Whoever does this first would succeed, but there can only be one directory with that name, so nobody else could make that directory. Instead, work in your home directory and maketutorial
(or, as an absolute path,~/tutorial
).By all means read the command line and the superuser, but you don’t have superuser privileges on this server so you won’t be able to do anything with sudo. I have already installed the tree command for everyone.