User Tools

Site Tools


linux_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux_tutorial [2016/05/12 18:46]
peek removed
— (current)
Line 1: Line 1:
-====== What Is A Terminal?  What Is A Shell? ====== 
- 
-===== In The Beginning... ===== 
- 
-"In the beginning there was the shell, and lo, it was good..." 
- 
-{{:vt100.jpg|The Terminal, in all it's 1970's glory}} 
- 
-An 80x24 matrix of blurry green characters with a keyboard, it was pure 1970's sexy.  No mouse, no graphics, just pure, unadulterated power.  Microsoft and Apple would have you believe that a command line is something to be feared and avoided.  Feared, yes, and rightly so, for there is great power in the command line; more than you will find in any GUI interface any day of the week.  And with great power comes great responsibility...  But for those knowledgeable in the ways of command-line-foo there is no going back. 
- 
-Today, we have computers that are so powerful that we often run dozens of programs simultaneously, while the operating system runs a hundred or more in the background, and then we complain about how slow the machine is!  In fact, in many ways, today's world has left the humble shell behind.  Preferring instead to focus on giving us simultaneous access to our dozens of programs through a sleek, modern, graphical user interface (GUI). 
- 
-=== Old And Busted: === 
-{{ :screenshot_from_2016-05-12_11-09-20.png?direct&500 |}} 
- 
-=== New Hotness:=== 
-{{ :screenshot_from_2016-05-12_11-06-35.png?direct&500 |New Hotness}} 
- 
-=== Q: How many windows do I actually have open on my desktop right now? === 
-A: 
- 
-{{ :screenshot_from_2016-05-12_11-07-11.png?direct&500 |}} 
- 
-...And that's just the current desktop!  I have multiple virtual desktops! 
- 
-{{ :screenshot_from_2016-05-12_11-11-42.png?direct&500 |}} 
- 
-===== Why Should I Bother? ===== 
- 
-"But why," I hear you say, "is any of this 1970's garbage relevant today, now that we have all of this flash-bang graphical GUI stuff?" 
- 
-The answer is simple: Because... 
-  * It's still the most powerful interface in the world 
-  * When you log into a machine remotely from off-site, particularly a server of some kind, the shell is what you will interacting with 
-  * All that flash-bang GUI stuff?  Yeah, that stuff runs //on top off// the a stack of shells! 
-  * A single shell can allow you to automate your workflow in ways that GUI interfaces cannot and never will -- work smarter, not harder! 
- 
-So this is something of which you should at least know the basics, and that's what this tutorial is all about. 
- 
-  * The **shell** is a special program that interacts with the user.  It's job is to wait for the user to type in a command.  When a command is received (the user pressed RETURN), the shell executes that command, updates it's internal state accordingly, and waits for the next command. 
- 
-  * Instead of entering commands manually, a user may decide to place commands into a file.  The shell can execute the commands listed within the file just as though they were typed in by a user.  __This, and the modular nature of UNIX command line programs, is the key to the true power of UNIX: Enabling the user to automate their workflow in ways that simply can't be done with a GUI.__  Files that hold commands for a shell are called **shell scripts**, or just scripts for short. 
- 
-  * In today's highly-graphical user environment, the **terminal** is just another graphical program whose job it is to provide a window on the screen inside of which the shell can run and interact with the user. 
- 
-====== Jumping Right In ====== 
- 
-===== Accessing The Shell ===== 
- 
-If you are using a computer without a graphical user interface, then congratulations, you're looking at a shell environment -- that, or a text-based login prompt that will take you to a shell environment. 
- 
-If you're in a graphical desktop, then search for an application named "terminal" There are many ways to do this depending on your operating system: 
- 
-  * If you're using the Ubuntu Unity desktop, which typically looks something like this: \\ {{ :unity.png?nolink&300 |Unity}} \\ Then press the "Super" key (a.k.a. the "Windows" key on PC keyboards, or the "Command" key on Apple keyboards).  Then type "terminal" into the dash search bar.  The terminal should be the first application listed in the search results below the search bar.  {{ :screenshot_from_2016-05-12_11-42-14.png?direct&300 |Ubuntu}} 
- 
-  * If you're using the Gnome desktop, which typically looks something like this: \\ {{ :gnome.jpg?nolink&300 |Gnome}} \\ Then click on Applications > System Tools > Terminal 
- 
-  * If you're using KDE, which typically looks something like this: \\ {{ :kde.jpg?nolink&300 |KDE}} \\ Then click on Programs > System > Konsole 
- 
-When the terminal appears, you will be looking at a window running a shell inside of it. 
- 
-NOTE: There are many different kinds of desktop environments available.  Unity and Gnome  
- 
-===== Shell Prompts ===== 
- 
-When the shell appears, it will print a prompt, letting you know some basic information and letting you know that it is ready for you to type in commands.  Here's what a standard command line prompt looks like: 
- 
-<code>ecomiske@ilex:~$ </code> 
- 
-**What does that junk in the command line prompt mean?** 
- 
-^ The Breakdown ^^ 
-^ <code>ecomiske</code> | Your user name (ecomiske is used here merely as an example) | 
-^ <code>@ilex</code> | The ''@'' symbol followed by the hostname of the machine you are on: "ecommiske at ilex" | 
-^ <code>:~</code> | The directory your command line shell is currently sitting in.  In this case, ''~'' means your user home area | 
-^ <code>$</code> | The typical last symbol at the end of a command line prompt.  For all regular users this is ''$'' | 
- 
-Your command line prompt may look slightly different.  The actual string of characters that makes up your command line is configurable via dot files in your home area, but that's beyond the scope of this tutorial. 
- 
-===== Notation ===== 
- 
-Now is a good time to talk about the notation that will be used in the rest of this document.  In many places, both here and elsewhere on the Internet: 
- 
-  * Whenever someone makes a reference to a command to be typed in on the command line, it will appear written thusly: <code>$ ls -al</code> The ''$'' symbol here denotes that the text to follow is the command to be typed.  So in accordance with the above example, you are instructed to type on your command line: ''ls -al'' (NOTE: The character ''$'' or ''#'' itself is an indicator of the user privileges under which the command is to be used.  A ''$'' symbol indicates that the command is to be typed as a regular user, where as a ''#'' indicates that the command should be typed by the administrator.  Since this is not a systems administration tutorial you won't be asked to do anything as an administrator.  But it's worth mentioning how the ''$'' and ''#'' characters are used so that you are aware of this when you read other documents online.) 
- 
-  * Whenever someone makes a reference to an unknown text that you the user are expected to fill in for yourself, that text is written thusly: <code><something-only-you-could-know></code>  For example: For Jane Comiske, ''<username>'' should be replaced with ''ecomiske'', while for Dr. Lou Gross, ''<username>'' should be replaced with ''gross'' And ''<password>'' would be replaced with, you guessed it, your password. 
- 
-  * Whenever someone makes a reference to an optional text, that text is written as <code>[option]</code> A choice of options is written as <code>[option1|option2|option3...]</code> 
  
linux_tutorial.1463078791.txt.gz ยท Last modified: 2016/05/12 18:46 by peek