<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.maximumpc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Maximum PC beginners guide RSS Feed</title>
 <link>http://www.maximumpc.com/tags/beginners+guide</link>
 <description>used for category lists, takes arguments</description>
 <language>en</language>
<item>
 <title>The Complete Beginner&#039;s Guide to Linux</title>
 <link>http://www.maximumpc.com/article/features/the_complete_beginners_guide_linux</link>
 <description>&lt;!--paging_filter--&gt;&lt;table border=&quot;0&quot; align=&quot;right&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
digg_url = &#039;http://www.maximumpc.com/article/features/the_complete_beginners_guide_linux&#039;;
&lt;/script&gt;&lt;script src=&quot;http://digg.com/tools/diggthis.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;We are certain that many of you want to try Linux to see what it is like, but have no idea where to start or how to get into it. This is our complete guide to introduce you to the Linux environment and teach you how to adjust to it if you are a new user. From picking the perfect distro for your needs to partitioning and installing the OS, this guide will show you the step-by-step process of getting Linux up and running on your machine. We break down the fundamental differences between the Linux and Windows graphical interfaces, and show you how to utilize Linux&#039;s terminal like a pro. Whether this is your first time running Linux or you&#039;ve been an open-source accolyte for years, you&#039;ll find lots of useful tips and reference information in this comprehensive overview. &lt;/p&gt;
&lt;div style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;/files/u17625/tuxpenguin_415.jpg&quot; width=&quot;415&quot; height=&quot;250&quot; /&gt;&lt;/div&gt;
&lt;p align=&quot;center&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;table border=&quot;0&quot; align=&quot;center&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;h3&gt;Table of Contents:&lt;/h3&gt;
&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;Part 1: Finding the Right Distribution&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_2_installation&quot;&gt;Part 2: Partition and Installation&lt;/a&gt;&lt;/h2&gt;
&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;Part 3: The Linux GUI&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_4_introduction_terminal&quot;&gt;Part 4: Introduction to the Terminal&lt;/a&gt;&lt;/h2&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;Part 1: Finding the Right Distribution&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the hardest things to do while starting out is &lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;finding a distro that is right for you&lt;/a&gt;. Many users try several before settling on one of two that they really like. Once they find a distro that feels right, they are often reluctant to switch unless the distro becomes unsuitable for their needs for whatever reason.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide1/ubuntu_virtual_desktop_sm.png&quot; width=&quot;415&quot; height=&quot;312&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Arguably, the most important factor in choosing a distro is your general level of experience with Linux. Not all distros cater to the same intended user audience. Some (like Ubuntu) are designed to be more accessible to novice users while other distros have a greater learning curve. Distros like Gentoo or Slackware are not necessarily meant to be “harder” than Ubuntu; they simply work out that way because they are less automated and often sacrifice ease of use for the greatest possible user control or system transparency. Many advanced users know what they are doing and prefer doing things their way.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_2_installation&quot;&gt;Part 2: Partition and Installation&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_2_installation&quot;&gt;This chapter&lt;/a&gt; is going to walk you through downloading and burning a CD image of your chosen distro(s), the traditional way of partitioning and setting up a dual-boot system, and another way to dual-boot without repartitioning. Instead of providing a step-by-step tutorial for a specific installation process, our goal is to educate you on the underlying concepts in a more generalized way that you will be able to apply towards many different Linux distros.&lt;/p&gt;
&lt;div style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_2_installation&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide2/installmeter2_sm.png&quot; width=&quot;415&quot; height=&quot;311&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;We cover software acquisitioning, hard drive partitioning, distro testing, and the actual install. You should also read &lt;a href=&quot;/article/howtos/howto_install_linux_risk_free_with_no_formatting_or_repartitioning_required&quot;&gt;our previous guide&lt;/a&gt; to installing Ubuntu for further instructions.  &lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;Part 3: Choosing Your Window Manager and Desktop Environment&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The Linux graphical user interface (GUI) system may be very different from what you are used to if you are coming from a Windows or Mac OS X background. The GUI of an operating system is commonly referred to as its shell. While virtually all versions of Windows since Windows 95 have used variations of the same basic shell (explorer.exe), there are numerous shells available for the Linux GUI. These Linux shells are called window managers and desktop environments. The term &lt;em&gt;window manager&lt;/em&gt; is used to address the simple core user interface of a shell, while the term &lt;em&gt;desktop environment &lt;/em&gt;is much more inclusive, covering the shell itself in addition to the various other programs that are integrated with it. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide3/avant_sm.png&quot; width=&quot;415&quot; height=&quot;259&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Due to the vast number of window managers available for Linux, many new users often feel overwhelmed at the idea of having to learn their way around them. We must emphasize that many people experiment with several window managers before settling down with one that feels right for them, and there certainly is no need to learn all of them. Due to their modular nature, it is common to have several window managers installed at once. &lt;/p&gt;
&lt;p&gt;Much like part one of this series that dealt with choosing a distro, &lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;this guide&lt;/a&gt; will help you to choose a window manager/desktop environment by introducing you to several of them and addressing their strengths and weaknesses. &lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_4_introduction_terminal&quot;&gt;Part 4: Introduction to the Terminal&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Traditionally, most new users have always been reluctant to experiment with the command line interface, (commonly referred to as the terminal) yet it has always been one of the most important parts of learning Linux. Once you understand the terminal, Linux will finally open up to you. The terminal is easily the most powerful part of a Linux system; it is your way of being able to work directly with the operating system without any barriers or hindrance. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_4_introduction_terminal&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/gnometerminal&amp;amp;xterm_sm.png&quot; width=&quot;415&quot; height=&quot;287&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_4_introduction_terminal&quot;&gt;This section&lt;/a&gt; will cover basic terminal usage in addition to ways to enhance basic commands. For the sake of simplicity, we will only address the underlying concepts of shell scripting instead of covering it in detail. We saved this part of our guide for last because it is typically the most difficult to grasp. However, the terminal is fairly easy to understand when broken down into simple concepts.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/howtos/howto_compile_programs_from_source_linux&quot;&gt;Bonus: How to Compile Programs From Source in Linux&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Although the introduction of package management on most distros, less diversity in CPU architecture among the user base, and massive increases in hardware speed have largely reduced or eliminated the need to compile software yourself, there are still a few instances where you would have to do so. Although the various official and unofficial software repositories for Ubuntu and other distros include most of the tools that the average user would need for any given purpose, the repositories are not completely comprehensive. Old packages sometimes get dropped and updated versions are often slow to be added. It may also take a release cycle or more for brand-new programs to be included.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;/article/howtos/howto_compile_programs_from_source_linux&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxcompile/get_build_essential_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;While Ubuntu and Debian have “backports” repositories that have fairly new packages in them, many other distros do not have such a resource. For large projects with large community support, the developer may offer nightly builds, but this is not the case for most projects. The only reliable way to get bleeding-edge software (stability issues aside) is to either find a repository that has it or download the source code from the developer and build it yourself. &lt;a href=&quot;/article/howtos/howto_compile_programs_from_source_linux&quot;&gt;We show you how&lt;/a&gt;! &lt;/p&gt;
&lt;h2 align=&quot;right&quot;&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;Read on to find your inner penguin! &amp;gt;&amp;gt; &lt;/a&gt;&lt;br /&gt;&lt;/h2&gt;
</description>
 <comments>http://www.maximumpc.com/article/features/the_complete_beginners_guide_linux#comments</comments>
 <category domain="http://www.maximumpc.com/taxonomy/term/31">Features</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/7567">beginners guide</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/4561">debian</category>
 <category domain="http://www.maximumpc.com/geek_tested/features">features</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/2772">gnome</category>
 <category domain="http://www.maximumpc.com/geek_tested/linux">linux</category>
 <category domain="http://www.maximumpc.com/geek_tested/open_source">open source</category>
 <category domain="http://www.maximumpc.com/geek_tested/software">Software</category>
 <category domain="http://www.maximumpc.com/geek_tested/ubuntu">ubuntu</category>
 <pubDate>Tue, 07 Apr 2009 22:00:00 -0500</pubDate>
 <dc:creator>Will Kraft</dc:creator>
 <guid isPermaLink="false">5903 at http://www.maximumpc.com</guid>
</item>
<item>
 <title>The Beginner&#039;s Guide to Linux Part 4: Introduction to the Terminal</title>
 <link>http://www.maximumpc.com/article/features/the_beginners_guide_linux_part_4_introduction_terminal</link>
 <description>&lt;!--paging_filter--&gt;&lt;table border=&quot;0&quot; align=&quot;right&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_1_finding_right_distribution&quot;&gt;Part 1: Finding the Right Distro&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_2_installation&quot;&gt;Part 2: Partition and Installation&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;Part 3: The Linux GUI&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h2&gt;Part 4: Introduction to the Terminal &lt;/h2&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Traditionally, most new users have always been reluctant to experiment with the command line interface, (commonly referred to as the terminal) yet it has always been one of the most important parts of learning Linux. Once you understand the terminal, Linux will finally open up to you. The terminal is easily the most powerful part of a Linux system; it is your way of being able to work directly with the operating system without any barriers or hindrance. 
&lt;p&gt;This guide will cover basic terminal usage in addition to ways to enhance basic commands. For the sake of simplicity, we will only address the underlying concepts of shell scripting instead of covering it in detail. We saved this part of our guide for last because it is typically the most difficult to grasp. However, the terminal is fairly easy to understand when broken down into simple concepts. &lt;/p&gt;
&lt;h2&gt;Overview of the Linux Terminal&lt;/h2&gt;
&lt;p&gt;Linux has many different shells that you can use for your terminal. One of the most common shells is called Bash, an abbreviation for “Bourne-Again Shell”. (a successor to the original Bourne Shell) Other popular shells include the original Bourne Shell, (sh) the Korn Shell, (ksh) and the C shell. (csh) If you are running a window manager, you would interact with a shell program through a terminal emulator like Xterm, GNOME Terminal, Konsole, or something similar. However, if you are not running a window manager or any other GUI, the terminal is your only way of interacting with the system. Generally, the terminal is a fail-safe repair system if Xorg (the GUI system) were to malfunction. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/bash_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;em&gt;&lt;strong&gt;The Bash Shell&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;This article will focus primarily on Bash, but is applicable to other shells as well. Each shell program has its own strengths and weaknesses and is different from the others, but you are not likely to experience this very much unless you get into complicated shell scripting and programming. In the case of simple commands, the various shells operate in much the same way.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/gnometerminal&amp;amp;xterm_sm.png&quot; width=&quot;415&quot; height=&quot;287&quot; /&gt; &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;em&gt;&lt;strong&gt;Gnome and Xterm&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Basic Terminal Concepts&lt;/h2&gt;
&lt;p&gt;Although Bash and other terminals vaguely resemble DOS, there are fundamental differences. While DOS is a full (albeit simple) operating system with the core functionality built in, Bash is simply a command shell that provides an interface to the operating system it runs on.  The first thing you must understand is that Bash has very little built-in functionality of its own. Every time you run a command in Bash, (no matter what it is) you are actually invoking another program as a separate process. Bash and other similar shells use a set of core utilities for basic file operations. (Some of the most important of these may be found at the end of this article) Text-based utilities like file copying/deletion/renaming, process management, and disk usage are all handled externally; although they appear to be part of Bash, that is not the case. &lt;/p&gt;
&lt;p&gt;Since the shell assumes that all programs are either in /bin or /usr/bin, Bash does not need a full pathname or require you to navigate to a specific directory to start a program. To run a program, simply type the program name at the command prompt. (e.g “vim” or “firefox”) In this article, we will refer to simple commands like these as “base commands.” &lt;/p&gt;
&lt;p&gt;The tilde (~) symbol is used as a reference to your home directory. In all instances there you would normally have to provide the full pathname of your home directory, the ~ symbol may be used instead as a matter of convenience. For instance, ~/sub_folder is the same as /home/&amp;lt;your home folder&amp;gt;/sub_folder. To navigate to your home folder from anywhere in the filesystem, you need only type “cd ~”. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/cd_home_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Like the rest of Linux, a shell has two levels of privilege: regular users and super users. At the command prompt, Bash will list the name of the current user in addition to the name of the machine the terminal is running on. The user listed first and the machine listed second, with an @ symbol separating them. (e.g. frodo@shire or root@aux) Bash will also list the current directory as well. Many other shells are far less verbose and list only “$” for all regular users and “#” for the root account.&lt;/p&gt;
&lt;p&gt;Each shell can run only one command at a time. However, you can run as many shell processes as you wish at the same time under a GUI with a terminal emulator. Many terminal emulators have a tab system that lets you easily switch back and forth between any shells that you have open. Without a GUI, you can run up to seven terminals at a time on most distros; these terminal processes are assigned a prefix of “tty” (Teletype) and a number. tty1-tty6 are generally available at any given time, whereas tty7 is normally used to run the GUI system and is therefore not available for other use. To switch to a different tty, press CTRL+ALT+Fx, where x is the number of the tty you would like to use. For example, to switch to tty3, press CTRL+ALT+F3. &lt;/p&gt;
&lt;p&gt;Each program started from a terminal becomes bound to that terminal as a child process; if you close a terminal, any child processes managed by that terminal are closed as well. If you want to keep a process running no matter what happens to its parent terminal, you must precede the command with “nohup” (short for “no hangup”) when you launch it. Instead of displaying output in the terminal window as is the norm, programs launched with nohup have all output written to a file called nohup.out.&lt;/p&gt;
&lt;p&gt;To terminate a running program before it is supposed to finish, press CTRL+C. &lt;/p&gt;
&lt;h3&gt;Switches&lt;/h3&gt;
&lt;p&gt;Many programs can perform multiple functions, so additional parameters called switches are used in addition to the base command to provide access to this functionality. Switches are preceded by a dash, placed after the base command, and use letters or numbers as references to certain functions. Since you can invoke multiple switches at once, (e.g. tar -czvf ) it is possible to fine-tune the actions of a program in very specific ways that the base command all by itself would not allow. Switches can be grouped together as shown in the previous example. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/switch_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;p&gt;You should remember that switches are case-sensitive and can do different things depending on whether they are uppercase or lowercase; for example, “-R” is not the same thing as “-r”. If you use switches that happen to conflict with each other or are invalid, the program will display an error message that explains the problem. To see all possible switches for a program, you should refer to its manual page. (run “man &amp;lt;program name&amp;gt;”) The manual page will also provide detailed usage parameters for a program in addition to examples and background information. Almost every program has a manual page associated with it, often in addition to more conventional documentation. &lt;/p&gt;
&lt;h3&gt;Wildcards&lt;/h3&gt;
&lt;p&gt;Bash and other shells support the use of wildcards, which are used to substitute unknown or non-designated characters in commands. The wildcard symbol is the asterisk. (*) Wildcards differ from variables, which are used to bind specific values in shell scripts and more advanced Bash applications. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/onetype_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Wildcards are frequently used with the list command. (ls). Using wildcards, you can force ls to show only certain types of files in its output instead of everything. For example, “ls *.png *.html” will display all PNG and HTML files in a directory.&lt;/p&gt;
&lt;p&gt;Wildcards may also be used to show all files in a directory that start with a certain letter; “ls a*” will display any file that begins with the letter a. It is also possible to apply a wildcard to a set of characters. For example, “ls [abc]*” will display any file in a directory that begins with a, b, or c. &lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;/article/features/the_beginners_guide_linux_part_3_choosing_your_window_manager_and_desktop_environment&quot;&gt;&amp;lt;&amp;lt; Back to Part 3 &lt;/a&gt;&lt;/h2&gt;
&lt;hr /&gt;
&lt;h3&gt;Program targets&lt;/h3&gt;
&lt;p&gt;Many programs provide you with the option of immediately acting against a specific target entity when the program starts. This target entity may be practically anything, (a file, directory, network address, or system device) depending on the nature of the program. A target may be located anywhere in the filesystem, and it may be invoked from any directory (provided the pathname is correct) For example, if you are in your home director and wish to edit a file in a subfolder, there is no need to change to the subfolder before opening the file. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/targets_sm.png&quot; width=&quot;415&quot; height=&quot;309&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Generally, the target should be specified after the base command and any switches. (e.g. “vim -R myfile.txt”) Sometimes, switches may have targets of their own in addition to the main program target. In such instances, the manual page will tell you what types of switch/target combinations the program will accept. &lt;/p&gt;
&lt;p&gt;Although most filenames are either single words or separated by underscore characters (e.g. file_1) The terminal supports multiple worded filenames as target entities. However, spaces in filenames must be preceded by a backslash, otherwise the shell will treat each word independently. (often causing an error) For instance, Bash would correctly process “multiple\ worded\ filename.txt” as “multiple worded filename.txt”. Omitting the backslashes would cause the shell to incorrectly interpret the filename as “multiple”, “worded”, and “filename.txt”. &lt;/p&gt;
&lt;h2&gt;Working with Input and Output&lt;/h2&gt;
&lt;h3&gt;Joining commands together&lt;/h3&gt;
&lt;p&gt;If you have two or more commands that you wish to run in sequence, type them on the same line and place “&amp;amp;&amp;amp;” between each separate command. The commands will then be executed in order, from left to right. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/&amp;amp;&amp;amp;_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;h3&gt;Pipelines&lt;/h3&gt;
&lt;p&gt;Software pipelines allow you to feed the output from one program directly into another. Like the &amp;amp;&amp;amp; operator, pipelines allow you to execute multiple commands in a specific sequence. However, a pipeline automatically takes the output from the previous command and feeds it into the next command whereas the &amp;amp;&amp;amp; operator treats each command independently. Pipelines are useful primarily because they allow further processing of a command and allows multiple interdependent commands to be chained together when necessary. The pipeline is invoked by placing the “|” symbol between two separate commands on the same line.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/pipeline_sm.png&quot; width=&quot;415&quot; height=&quot;289&quot; /&gt; &lt;/p&gt;
&lt;p&gt;For example, the grep utility is designed to search for a specific keyword you provide. If you were to run a program like ls, you can use grep to isolate a certain file (e.g. file1.jpg) from what could be a very long file list, even with wildcard filtering. If you were to run “ls | grep file1.jpg”, only file1.jpg would be listed in the terminal (if it exists) even though ls might return much more output under normal conditions. &lt;/p&gt;
&lt;h3&gt;Output Redirection&lt;/h3&gt;
&lt;p&gt;Sometimes, you may want to save terminal output. While you could use a pipeline to dump it into a text editor, there is an easier way. Using the greater-than (&amp;gt;) symbol, you can save terminal output to a text file. For example, running “cat file1 file2 &amp;gt; file3” will join the contents of file1 and file2 together and will then save the resulting output as file3. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/output_redirect_sm.png&quot; width=&quot;415&quot; height=&quot;268&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Be careful with this, since any existing file with the same name as the one you specify will automatically be replaced. To append the output to an existing file, use “&amp;gt;&amp;gt;” instead of “&amp;gt;”. &lt;/p&gt;
&lt;h2&gt;Shell Scripting Concepts&lt;/h2&gt;
&lt;p&gt;While the simple operators described in the previous section can allow you to create complex commands, true shell scripting can do much more by taking the principles described in the previous section to a whole new level. A Linux shell script works just like a Windows batch file in a sense; both are little more than a set of instructions that rely exclusively on external programs to do the actual work. This differs fundamentally from programming languages like Perl, which use internal language features instead of external programs. Shell scripting is based on the principle of using various simple programs to produce a complicated result. &lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://dl.maximumpc.com/galleries/linuxguide4/shellscript_source_sm.png&quot; width=&quot;415&quot; height=&quot;268&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Shell scripting is a useful tool for creating a stopgap solution for a problem in a few minutes using existing tools instead of having to re-invent the wheel by developing a program of your own. In this way, shell scripting has its strengths and weaknesses like any other language: Shell scripts are easy to write if you have any programming experience at all and can save considerable development time by using programs that already have the functionality you need. On the downside, shell scripts are written for specific shells and are not very portable as a result. (According to an old saying, it is often easier to port an entire shell than a complicated script that relies heavily on the features of one particular shell) Likewise, shell scripts are not ideal for permanent solutions and are not really designed with security in mind. As with any other language, you should decide beforehand whether the benefits of shell scripting are enough to offset its downsides for your particular situation. &lt;/p&gt;
&lt;p&gt;Shell scripts support all the essential features of any scripting language, including conditional statements, variables, loops, etc.  Since a shell script is little more than a bunch of individual commands kludged to work together, all the functionality the script might use is available for individual commands as well. (although it is inconvenient to do things that way)&lt;/p&gt;
&lt;p&gt;To run a shell script, navigate to the directory it is in and run “./&amp;lt;script name&amp;gt;” (e.g. ./shellscript.sh) Do not omit the period and forward slash at the beginning or the script will not work. Also, you may have to make scripts executable with chmod before you will be able to run them. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read on for our table of Essential Terminal Commands! &lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;Essential basic commands&lt;/h3&gt;
&lt;p&gt;Although there are hundreds of commands available for the terminal, the following table will introduce you to the most essential ones. Any portions of a command enclosed in &amp;lt; &amp;gt; brackets is a variable and should be replaced with what is specified between the brackets. For example, &amp;lt; file&amp;gt; indicates that a file should be designated. &lt;/p&gt;
&lt;div class=&quot;module orange-module article-module&quot;&gt; &lt;span class=&quot;module-name&quot;&gt;&lt;strong&gt;Essential Terminal Commands&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;module-content&quot;&gt;
&lt;div class=&quot;module-text full&quot;&gt;
&lt;div class=&quot;spec-table orange&quot;&gt;
&lt;table border=&quot;0&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th class=&quot;head-empty&quot;&gt;Command 			&lt;/th&gt;
&lt;th class=&quot;head-light&quot;&gt;Function&lt;/th&gt;
&lt;th class=&quot;head-dark&quot;&gt;Usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;ls&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Lists all files in a directory&lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“ls” (Use “ls -l” for detailed output) For those used to DOS or cmd.exe, “dir” is very similar. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;cp&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Copies a file or folder&lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“cp &amp;lt;source file/folder&amp;gt; &amp;lt;destination file/folder&amp;gt;” e.g. “cp file1 file2” or “cp folder1 folder2” The first file/folder in the command is the original file while the second one is the file/folder that will be created as a copy. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;mv&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt; Moves a file from one directory to another. Also works as a rename command &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“mv &amp;lt;/folder/file&amp;gt; &amp;lt;/newfolder/file&amp;gt;” or “mv file1 file2” (this will rename file1 to file2) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;cd&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Change to a different directory   &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“cd &amp;lt;new directory&amp;gt;” Only a folder name is needed instead of a full path if the new directory is a sub-directory of the current folder. To move to the next highest directory, run “cd ..” &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;mkdir&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Makes a new directory in the current folder&lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“mkdir &amp;lt;new directory name&amp;gt;”&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;rm&lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Removes a file or directory&lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“rm &amp;lt;file&amp;gt;” removes a file. To remove a directory, use “rm -r &amp;lt;directory&amp;gt;” . &lt;strong&gt;Beware of “rm -rf /”, as this command will delete &lt;u&gt;everything &lt;/u&gt;if executed as root. &lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;chmod &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;     Changes file properties &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;Chmod assigns file properties based on numbers and letters. Using + will add a new property, while – will take it away. For example, “chmod +x &amp;lt;filename&amp;gt;” will make a file (like a shell script) executable. For a list of file properties, run “info chmod”.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;chown &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;      Changes ownership of a file or folder &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“chown &amp;lt;owner&amp;gt;:&amp;lt;group&amp;gt;   &amp;lt;file&amp;gt;” &amp;lt;owner&amp;gt; and &amp;lt;group&amp;gt; should be set to the new owner and group.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;man &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;       Shows a manual page that tells you how to use a program  &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“man &amp;lt;program name&amp;gt;” Sometimes, there is an “info &amp;lt;program name&amp;gt;” as well.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;top &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Shows real-time process information and system usage stats          &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“top” To exit top, press Q.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;cat &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Concatenation tool used to join plain text files together &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“cat &amp;lt;file1&amp;gt; &amp;lt;file2&amp;gt;” Cat is often used to preview individual files, but this is not really what it is for. (use less instead)  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;ps &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Shows process information for a user &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“ps -u &amp;lt;user&amp;gt;” e.g. “ps -u root” Sort of like top, but good for when you don&#039;t want or need real-time info. This command is best used with a grep pipeline to help you find a specific process. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;kill &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;           Forcefully terminates a process &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“kill &amp;lt;process ID&amp;gt;” The process ID of the program you want to kill can be determined by running ps or top as shown above. If a program will not terminate with the normal kill command, “kill -9 &amp;lt;process ID&amp;gt;” will stop it for sure.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;sudo &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;            Executes command as superuser/root &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“sudo &amp;lt;program&amp;gt;” &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;su &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;Escalates to a root shell &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“su” &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;less &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;View an individual text file  &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;“less &amp;lt;filename&amp;gt;” The up and down arrows allow you to scroll through the file. To return to the shell, press Q. Use this tool instead of cat when you want to look for individual files. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;item&quot;&gt;Grep &lt;/td&gt;
&lt;td class=&quot;item-light&quot;&gt;               Searches for a text string &lt;/td&gt;
&lt;td class=&quot;item-dark&quot;&gt;Grep is frequently used in pipelines, but “grep &amp;lt;pattern&amp;gt; &amp;lt;file&amp;gt;” can also be used to search for keywords in files.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&quot;spec-notes&quot;&gt;  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
 <comments>http://www.maximumpc.com/article/features/the_beginners_guide_linux_part_4_introduction_terminal#comments</comments>
 <category domain="http://www.maximumpc.com/taxonomy/term/31">Features</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/7567">beginners guide</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/4561">debian</category>
 <category domain="http://www.maximumpc.com/geek_tested/features">features</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/2772">gnome</category>
 <category domain="http://www.maximumpc.com/geek_tested/linux">linux</category>
 <category domain="http://www.maximumpc.com/geek_tested/open_source">open source</category>
 <category domain="http://www.maximumpc.com/geek_tested/software">Software</category>
 <category domain="http://www.maximumpc.com/taxonomy/term/7565">terminal</category>
 <category domain="http://www.maximumpc.com/geek_tested/ubuntu">ubuntu</category>
 <pubDate>Tue, 07 Apr 2009 20:00:00 -0500</pubDate>
 <dc:creator>Will Kraft</dc:creator>
 <guid isPermaLink="false">5906 at http://www.maximumpc.com</guid>
</item>
</channel>
</rss>
