It is present only to show the shell's prompt. You should not type the $ at the beginning of that line. For instance, if you want to determine whether you're using the Bash or Zsh shell, you can run this command: $ echo $SHELL Since we're using Bash in this book and the rest of the Core Curriculum, we usually show the $ at the beginning of each command you need to enter. If you're logged in as a normal non-root user, you will still see the $ or % prompt - if you don't see either one but see a #, then you're logged in as root. This can be a little confusing since # is also a comment character, but it's usually apparent when you're looking at a prompt vs looking at a comment. Under Bash and Zsh, the root prompt is #. Furthermore, both shells change the prompt character when you're logged in as the super-powerful admin user, root. Zsh, however, displays a % prompt by default: %īoth Bash and Zsh let you change the prompt, so your actual prompt may be different. However, one difference is obvious from the start: the prompt displayed when your command line is waiting for a command. For the most part, you won't run into too many of the differences during the Launch School curriculum. Recent versions of macOS on Macs use a somewhat different shell called Zsh. This book mostly assumes that you're using the Bash shell, which is the default shell on many operating systems. Other operating systems, such as Windows, have command prompts, but they differ in some significant ways that make it difficult to cover their usage in one book.
#LEARN MAC COMMAND LINE MAC OS X#
Other operating systems such as Mac OS X and Unix are very similar, so you'll be able to use everything you learn in this book on those operating systems. Since the Linux operating system is the most commonly used operating system for servers, we will cover its command line interface in this book. In fact, the command line is a text-based interface through which one can navigate, create, execute, and act on a computer's files and directories with precision. Like a graphical user interface, the command line is one way that the operating system represents the computer's files, directories, and programs (which are also files) to the user. It is aptly called the command line interface (or CLI), the command line, or the command prompt. Most operating systems that run on servers, desktops, and laptops provide another way of commanding your computer that many people have never even heard of.
#LEARN MAC COMMAND LINE WINDOWS#
Many computer operating systems such as Windows and OS X provide a graphical user interface that enables us to open and view files, play games, turn on music, etc., all by simple movements and clicks of the mouse. Through simple gestures, we are able to command the computer. We communicate with modern computers by clicking, tapping, sliding, hovering, typing, shaking, and speaking.