CINXE.COM
UsingTheTerminal - Community Help Wiki
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta name="robots" content="index,nofollow"> <title>UsingTheTerminal - Community Help Wiki</title> <script type="text/javascript" src="/moin_static198/common/js/common.js"></script> <script type="text/javascript"> <!-- var search_hint = "Search"; //--> </script> <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/moin_static198/light/css/common.css"> <link rel="stylesheet" type="text/css" charset="utf-8" media="screen" href="/moin_static198/light/css/screen.css"> <link rel="stylesheet" type="text/css" charset="utf-8" media="print" href="/moin_static198/light/css/print.css"> <link rel="stylesheet" type="text/css" charset="utf-8" media="projection" href="/moin_static198/light/css/projection.css"> <!-- css only for MS IE6/IE7 browsers --> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/moin_static198/light/css/msie.css"> <![endif]--> <link rel="alternate" title="Community Help Wiki: UsingTheTerminal" href="/community/UsingTheTerminal?diffs=1&show_att=1&action=rss_rc&unique=0&page=UsingTheTerminal&ddiffs=1" type="application/rss+xml"> <link rel="Start" href="/community/CommunityHelpWiki"> <link rel="Alternate" title="Wiki Markup" href="/community/UsingTheTerminal?action=raw"> <link rel="Alternate" media="print" title="Print View" href="/community/UsingTheTerminal?action=print"> <link rel="Search" href="/community/FindPage"> <link rel="Index" href="/community/TitleIndex"> <link rel="Glossary" href="/community/WordIndex"> <link rel="Help" href="/community/HelpOnFormatting"> </head> <body lang="en" dir="ltr"> <div id="leftbanner"> </div> <div id="rightbanner"> </div> <div id="container"> <div id="container-inner"> <div id="mothership"> <ul> <li><a href="https://canonical.com/partners">Partners</a> </li> <li><a href="https://ubuntu.com/community/support">Support</a></li> <li><a href="https://ubuntu.com/community">Community</a></li> <li><a href="https://ubuntu.com">Ubuntu.com</a></li> </ul> </div> <div id="header"> <h1 id="ubuntu-header"><a href="https://help.ubuntu.com/">Ubuntu Documentation</a></h1> <ul id="main-menu"> <li><a href="https://help.ubuntu.com/">Official Documentation</a></li> <li><a class="main-menu-item current" href="https://help.ubuntu.com/community/CommunityHelpWiki">Community Help Wiki</a></li> <li><a href="https://ubuntu.com/community/contribute">Contribute</a></li> </ul> </div> <div id="menu-search"> <div id="subheader"> <div class="subheader-menu"> <div id="second-nav"> <ul id="username"><li><a class="nbinfo" href="/community/UsingTheTerminal?action=info" rel="nofollow">Page History</a></li><li><a href="/community/UsingTheTerminal?action=login&login=1" id="login" rel="nofollow">Login to edit</a></li></ul> </div> <div id="user-info"> </div> </div> </div> <div id="search-box"> <noscript> <form action="http://www.google.com/cse" id="cse-search-box"> <div> <input type="hidden" name="cx" value="003883529982892832976:e2vwumte3fq" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" size="21" /> <input type="submit" name="sa" value="Search" /> </div> </form> </noscript> <script> document.write('<form action="https://help.ubuntu.com/search.html" id="cse-search-box">'); document.write(' <div>'); document.write(' <input type="hidden" name="cof" value="FORID:9" />'); document.write(' <input type="hidden" name="cx" value="003883529982892832976:e2vwumte3fq" />'); document.write(' <input type="hidden" name="ie" value="UTF-8" />'); document.write(' <input type="text" name="q" size="21" />'); document.write(' <input type="submit" name="sa" value="Search" />'); document.write(' </div>'); document.write('</form>'); </script> </div> </div> <div id="title"><h1> <span id="pagelocation"><a href="/community/UsingTheTerminal">UsingTheTerminal</a></span> </h1> </div> <div id="cwt-nav3"> <hr class="clear" /> </div> <div id="cwt-content" class="clearfix content-area"> <div id="page" lang="en" dir="ltr"> <div dir="ltr" id="content" lang="en"><span class="anchor" id="top"></span> <span class="anchor" id="line-1"></span><span class="anchor" id="line-2"></span><div><table style="&quot; float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em; &quot;"><tbody><tr> <td style="&quot; padding:0.5em; &quot;"><p class="line891"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li> <a href="#Why_use_the_terminal.3F">Why use the terminal?</a></li><li> <a href="#Starting_a_terminal">Starting a terminal</a><ol><li> <a href="#In_Unity">In Unity</a></li><li> <a href="#In_GNOME">In GNOME</a></li><li> <a href="#In_Xfce_.28Xubuntu.29">In Xfce (Xubuntu)</a></li><li> <a href="#In_KDE_.28Kubuntu.29">In KDE (Kubuntu)</a></li><li> <a href="#In_LXDE_.28Lubuntu.29">In LXDE (Lubuntu)</a></li></ol></li><li> <a href="#Commands">Commands</a><ol><li> <a href="#sudo:_Executing_Commands_with_Administrative_Privileges">sudo: Executing Commands with Administrative Privileges</a></li><li> <a href="#File_.26_Directory_Commands">File & Directory Commands</a></li><li> <a href="#Running_a_File_Within_a_Directory">Running a File Within a Directory</a></li><li> <a href="#System_Information_Commands">System Information Commands</a></li><li> <a href="#Adding_A_New_User">Adding A New User</a></li></ol></li><li> <a href="#Options">Options</a></li><li> <a href="#A.22Man.22_and_getting_help">"Man" and getting help</a><ol><li> <a href="#Searching_the_manual_pages">Searching the manual pages</a></li></ol></li><li> <a href="#Other_Useful_Things">Other Useful Things</a><ol><li> <a href="#Prettier_Manual_Pages">Prettier Manual Pages</a></li><li> <a href="#Pasting_in_commands">Pasting in commands</a></li><li> <a href="#Save_on_typing">Save on typing</a></li><li> <a href="#Change_the_text">Change the text</a></li></ol></li><li> <a href="#More_ways_to_run_a_terminal">More ways to run a terminal</a></li><li> <a href="#An_extremely_handy_tool_::_Incremental_history_searching">An extremely handy tool :: Incremental history searching</a></li><li> <a href="#How_to_create_upsidedown_and.2For_reverse_text_with_your_terminal">How to create upsidedown and/or reverse text with your terminal</a></li><li> <a href="#More_Information">More Information</a></li></ol></div></td> </tr> </tbody></table></div><span class="anchor" id="line-3"></span><span class="anchor" id="line-4"></span><p class="line867"> <h1 id="Why_use_the_terminal.3F">Why use the terminal?</h1> <span class="anchor" id="line-5"></span><p class="line867"><em>"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are." <span class="anchor" id="line-6"></span><br> -- from <strong>man intro(1)</strong> </em> <span class="anchor" id="line-7"></span><span class="anchor" id="line-8"></span><p class="line862">This page gives an introduction to using the command-line interface terminal, from now on abbreviated to the <strong>terminal</strong>. There are many varieties of Linux, but almost all of them use similar commands that can be entered from the terminal. <span class="anchor" id="line-9"></span><span class="anchor" id="line-10"></span><p class="line874">There are also many graphical user interfaces (GUIs), but each of them works differently and there is little standardization between them. Experienced users who work with many different Linux distributions therefore find it easier to learn commands that can be used in all varieties of Ubuntu and, indeed, in other Linux distributions as well. <span class="anchor" id="line-11"></span><span class="anchor" id="line-12"></span><p class="line874">For the novice, commands can appear daunting: <span class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><pre><span class="anchor" id="line-1"></span>sudo gobbledegook blah_blah -w -t -h --long-switch aWkward/ComBinationOf/mixedCase/underscores_strokes/and.dots</pre><span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line874">However, it is important to note that even experienced users often cut and paste commands (from a guide or manual) into the terminal; they do not memorize them. <span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><p class="line874">It is important, of course, to know how to use the terminal - and anyone who can manage typing, backspacing, and cutting and pasting will be able to use the terminal (it is not more difficult than that). <span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span><p class="line867"> <h1 id="Starting_a_terminal">Starting a terminal</h1> <span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><p class="line867"> <h2 id="In_Unity">In Unity</h2> <span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line874">Unity is the default desktop environment used as of 11.04. Where systems are not ready for Unity they revert to GNOME which is also used in previous releases such as Ubuntu 10.04 LTS (Lucid), see next sub-section. <span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line874">The easiest way to open the terminal is to use the 'search' function on the dash. <span class="anchor" id="line-28"></span>Or you can click on the 'More Apps' button, click on the 'See more results' by the installed section, and find it in that list of applications. A third way, available after you click on the 'More Apps' button, is to go to the search bar, and see that the far right end of it says 'All Applications'. You then click on that, and you'll see the full list. Then you can go to Accessories -> Terminal after that. So, the methods in Unity are: <span class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><p class="line867"><strong>Dash</strong> -> <strong>Search for Terminal</strong> <span class="anchor" id="line-31"></span><span class="anchor" id="line-32"></span><p class="line867"><strong>Dash</strong> -> <strong>More Apps</strong> -> <strong> 'See More Results' </strong> -> <strong>Terminal</strong> <span class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span><p class="line867"><strong>Dash</strong> -> <strong>More Apps</strong> -> <strong>Accessories</strong> -> <strong>Terminal</strong> <span class="anchor" id="line-35"></span><span class="anchor" id="line-36"></span><p class="line867"><strong>Keyboard Shortcut:</strong> Ctrl + Alt + T <span class="anchor" id="line-37"></span><span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line867"> <h2 id="In_GNOME">In GNOME</h2> <span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line874">GNOME is the classic desktop environment for Ubuntu 11.04 (Natty) and is the default desktop environment in earlier releases, such as Ubuntu 10.04 LTS (Lucid). <span class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line867"><strong>Applications menu</strong> -> <strong>Accessories</strong> -> <strong>Terminal</strong>. <span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line867"><strong>Keyboard Shortcut:</strong> Ctrl + Alt + T <span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><p class="line867"> <h2 id="In_Xfce_.28Xubuntu.29">In Xfce (Xubuntu)</h2> <span class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><p class="line867"><strong>Applications menu</strong> -> <strong>System</strong> -> <strong>Terminal</strong>. <span class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><p class="line867"><strong>Keyboard Shortcut:</strong> Super + T <span class="anchor" id="line-52"></span><span class="anchor" id="line-53"></span><p class="line867"><strong>Keyboard Shortcut:</strong> Ctrl + Alt + T <span class="anchor" id="line-54"></span><span class="anchor" id="line-55"></span><p class="line867"> <h2 id="In_KDE_.28Kubuntu.29">In KDE (Kubuntu)</h2> <span class="anchor" id="line-56"></span><span class="anchor" id="line-57"></span><p class="line867"><strong>KMenu</strong> -> <strong>System</strong> -> <strong>Terminal Program (Konsole)</strong>. <span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span><p class="line867"> <h2 id="In_LXDE_.28Lubuntu.29">In LXDE (Lubuntu)</h2> <span class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><p class="line867"><strong>Menu</strong> -> <strong>Accessories</strong> -> <strong>LXTerminal</strong>. <span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><p class="line867"><strong>Keyboard Shortcut:</strong> Ctrl + Alt + T <span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><span class="anchor" id="line-66"></span><p class="line867"> <h1 id="Commands">Commands</h1> <span class="anchor" id="line-67"></span><span class="anchor" id="line-68"></span><p class="line867"> <h2 id="sudo:_Executing_Commands_with_Administrative_Privileges">sudo: Executing Commands with Administrative Privileges</h2> <span class="anchor" id="line-69"></span><span class="anchor" id="line-70"></span><p class="line874">The sudo command executes a command with administrative privileges (root-user administrative level), which is necessary, for example, when working with directories or files not owned by your user account. When using sudo you will be prompted for your password. Only users with administrative privileges are allowed to use sudo. <span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span><p class="line862">Be careful when executing commands with administrative privileges - you might damage your system! You should <strong>never</strong> use normal sudo to start graphical applications with administrative privileges. Please see <a href="/community/RootSudo">RootSudo</a> for more information on using sudo correctly. <span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span><p class="line867"> <h2 id="File_.26_Directory_Commands">File & Directory Commands</h2> <span class="anchor" id="line-75"></span><ul><li><p class="line862">The tilde (~) symbol stands for your home directory. If you are <em>user</em>, then the tilde (~) stands for /home/<em>user</em> <span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span></li><li class="gap"><p class="line891"><strong>pwd</strong>: The <strong>pwd</strong> command will allow you to know in which directory you're located (<strong>pwd</strong> stands for "print working directory"). Example: <strong>"pwd"</strong> in the Desktop directory will show "~/Desktop". Note that the GNOME Terminal also displays this information in the title bar of its window. A useful gnemonic is "present working directory." <span class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span></li><li class="gap"><p class="line891"><strong>ls</strong>: The <strong>ls</strong> command will show you ('list') the files in your current directory. Used with certain options, you can see sizes of files, when files were made, and permissions of files. Example: <strong>"ls ~"</strong> will show you the files that are in your home directory. <span class="anchor" id="line-80"></span><span class="anchor" id="line-81"></span></li><li class="gap"><p class="line891"><strong>cd</strong>: The <strong>cd</strong> command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use <strong>cd</strong>. Examples: <span class="anchor" id="line-82"></span><span class="anchor" id="line-83"></span><ul><li><p class="line862">To navigate into the root directory, use <strong>"cd /"</strong> <span class="anchor" id="line-84"></span></li><li><p class="line862">To navigate to your home directory, use <strong>"cd"</strong> or <strong>"cd ~"</strong> <span class="anchor" id="line-85"></span></li><li><p class="line862">To navigate up one directory level, use <strong>"cd .."</strong> <span class="anchor" id="line-86"></span></li><li><p class="line862">To navigate to the previous directory (or back), use <strong>"cd -"</strong> <span class="anchor" id="line-87"></span></li><li><p class="line862">To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, <strong>"cd /var/www"</strong> to go directly to the /www subdirectory of /var/. As another example, <strong>"cd ~/Desktop"</strong> will move you to the Desktop subdirectory inside your home directory. <span class="anchor" id="line-88"></span><span class="anchor" id="line-89"></span></li></ul></li><li class="gap"><p class="line891"><strong>cp</strong>: The <strong>cp</strong> command will make a copy of a file for you. Example: <strong>"cp file foo"</strong> will make an exact copy of "file" and name it "foo", but the file "file" will still be there. If you are copying a directory, you must use <strong>"cp -r directory foo"</strong> (copy recursively). (To understand what "recursively" means, think of it this way: to copy the directory and all its files and subdirectories and all their files and subdirectories of the subdirectories and all their files, and on and on, "recursively") <span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span></li><li class="gap"><p class="line891"><strong>mv</strong>: The <strong>mv</strong> command will move a file to a different location or will rename a file. Examples are as follows: <strong>"mv file foo"</strong> will rename the file "file" to "foo". <strong>"mv foo ~/Desktop"</strong> will move the file "foo" to your Desktop directory, but it will not rename it. You must specify a new file name to rename a file. <span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><ul><li>To save on typing, you can substitute '~' in place of the home directory. <span class="anchor" id="line-94"></span></li><li><p class="line862">Note that if you are using <strong>mv</strong> with <strong>sudo</strong> you can use the ~ shortcut, because the terminal expands the ~ to your home directory. However, when you open a root shell with <strong>sudo -i</strong> or <strong>sudo -s</strong>, ~ will refer to the root account's home directory, not your own. <span class="anchor" id="line-95"></span><span class="anchor" id="line-96"></span></li></ul></li><li class="gap"><p class="line891"><strong>rm</strong>: Use this command to remove or delete a file in your directory. <span class="anchor" id="line-97"></span><span class="anchor" id="line-98"></span></li><li class="gap"><p class="line891"><strong>rmdir</strong>: The <strong>rmdir</strong> command will delete an <em>empty</em> directory. To delete a directory and all of its contents recursively, use <strong>rm -r</strong> instead. <span class="anchor" id="line-99"></span><span class="anchor" id="line-100"></span></li><li class="gap"><p class="line891"><strong>mkdir</strong>: The <strong>mkdir</strong> command will allow you to create directories. Example: <strong>"mkdir music"</strong> will create a directory called "music". <span class="anchor" id="line-101"></span><span class="anchor" id="line-102"></span></li></ul><p class="line862">Here is an example of when it would be necessary to execute a command with administrative privileges. Let's suppose that another user has accidentally moved one of your documents from your <strong>Documents</strong> directory to the root directory. Normally, to move the document back, you would type <strong>mv /mydoc.odt ~/Documents/mydoc.odt</strong>, but by default you are not allowed to modify files outside your home directory. To get around this, you would type <strong>sudo mv /mydoc.odt ~/Documents/mydoc.odt</strong>. This will successfully move the document back to its correct location, provided that you have administrative privileges. <span class="anchor" id="line-103"></span><span class="anchor" id="line-104"></span><p class="line867"> <h2 id="Running_a_File_Within_a_Directory">Running a File Within a Directory</h2> <span class="anchor" id="line-105"></span><span class="anchor" id="line-106"></span><p class="line874">So you've decided to run a file using the command-line? Well... there's a command for that too! <span class="anchor" id="line-107"></span><span class="anchor" id="line-108"></span><p class="line867"><strong>./</strong><em>filename.extension</em> <span class="anchor" id="line-109"></span><span class="anchor" id="line-110"></span><p class="line862">After navigating to the file's directory, this command will enable any Ubuntu user to run files compiled via GCC or any other programming language. Although the example above indicates a file name extension, please notice that, differently from some other operating systems, Ubuntu (and other Linux-based systems) do not care about file extensions (they can be anything, or nothing). <strong>Keep in mind that the 'extension' will vary depending upon the language the source code is written in. Also, it is not possible, for compiled languages (like C and C++) to run the source code directly -- the file must be <a class="https" href="https://help.ubuntu.com/community/CompilingEasyHowTo">compiled</a> first, which means it will be translated from a human-readable programming language to something the computer can understand.</strong> Some possible extensions: ".c" for C source, ".cpp" for C++, ".rb" for Ruby, ".py" for Python, etc. Also, remember that (in the case of interpreted languages like Ruby & Python) <em><strong>you must have a version of that language installed on Ubuntu before trying to run files written with it.</strong></em> <span class="anchor" id="line-111"></span><span class="anchor" id="line-112"></span><p class="line862">Finally, the file will only be executed if the file permissions are correct -- please see the <a class="https" href="https://help.ubuntu.com/community/FilePermissions">FilePermissions</a> help page for details. <span class="anchor" id="line-113"></span><span class="anchor" id="line-114"></span><p class="line867"> <h2 id="System_Information_Commands">System Information Commands</h2> <span class="anchor" id="line-115"></span><span class="anchor" id="line-116"></span><p class="line867"><strong>df</strong>: The <strong>df</strong> command displays filesystem disk space usage for all mounted partitions. "<strong>df -h</strong>" is probably the most useful - it uses megabytes (M) and gigabytes (G) instead of blocks to report. (<strong>-h</strong> means "human-readable") <span class="anchor" id="line-117"></span><span class="anchor" id="line-118"></span><p class="line867"><strong>du</strong>: The <strong>du</strong> command displays the disk usage for a directory. It can either display the space used for all subdirectories or the total for the directory you run it on. Example: <span class="anchor" id="line-119"></span><span class="anchor" id="line-120"></span><span class="anchor" id="line-121"></span><span class="anchor" id="line-122"></span><span class="anchor" id="line-123"></span><span class="anchor" id="line-124"></span><span class="anchor" id="line-125"></span><pre><span class="anchor" id="line-1-1"></span>user@users-desktop:~$ du /media/floppy <span class="anchor" id="line-2"></span>1032 /media/floppy/files <span class="anchor" id="line-3"></span>1036 /media/floppy/ <span class="anchor" id="line-4"></span>user@users-desktop:~$ du -sh /media/floppy <span class="anchor" id="line-5"></span>1.1M /media/floppy/</pre><span class="anchor" id="line-126"></span><span class="anchor" id="line-127"></span><p class="line862">In the above example <strong>-s</strong> means "Summary" and <strong>-h</strong> means "Human Readable". <span class="anchor" id="line-128"></span><span class="anchor" id="line-129"></span><p class="line867"><strong>free</strong>: The <strong>free</strong> command displays the amount of free and used memory in the system. <strong>"free -m"</strong> will give the information using megabytes, which is probably most useful for current computers. <span class="anchor" id="line-130"></span><span class="anchor" id="line-131"></span><p class="line867"><strong>top</strong>: The <strong>top</strong> ('table of processes') command displays information on your Linux system, running processes and system resources, including CPU, RAM & swap usage and total number of tasks being run. To exit <strong>top</strong>, press <strong>"q"</strong>. <span class="anchor" id="line-132"></span><span class="anchor" id="line-133"></span><p class="line867"><strong>uname -a</strong>: The <strong>uname</strong> command with the <strong>-a</strong> option prints all system information, including machine name, kernel name & version, and a few other details. Most useful for checking which kernel you're using. <span class="anchor" id="line-134"></span><span class="anchor" id="line-135"></span><p class="line867"><strong>lsb_release -a</strong>: The <strong>lsb_release</strong> command with the <strong>-a</strong> option prints version information for the Linux release you're running, for example: <span class="anchor" id="line-136"></span><span class="anchor" id="line-137"></span><span class="anchor" id="line-138"></span><span class="anchor" id="line-139"></span><span class="anchor" id="line-140"></span><span class="anchor" id="line-141"></span><span class="anchor" id="line-142"></span><span class="anchor" id="line-143"></span><pre><span class="anchor" id="line-1-2"></span>user@computer:~$ lsb_release -a <span class="anchor" id="line-2-1"></span>No LSB modules are available. <span class="anchor" id="line-3-1"></span>Distributor ID: Ubuntu <span class="anchor" id="line-4-1"></span>Description: Ubuntu 11.10 <span class="anchor" id="line-5-1"></span>Release: 11.10 <span class="anchor" id="line-6"></span>Codename: oneiric</pre><span class="anchor" id="line-144"></span><span class="anchor" id="line-145"></span><p class="line867"><strong>ip addr</strong> reports on your system's network interfaces. <span class="anchor" id="line-146"></span><span class="anchor" id="line-147"></span><p class="line867"> <h2 id="Adding_A_New_User">Adding A New User</h2> <span class="anchor" id="line-148"></span><p class="line862">The <strong>"adduser newuser"</strong> command will create a new general user called "newuser" on your system, and to assign a password for the newuser account use <strong>"passwd newuser"</strong>. <span class="anchor" id="line-149"></span><span class="anchor" id="line-150"></span><p class="line867"> <h1 id="Options">Options</h1> <span class="anchor" id="line-151"></span><span class="anchor" id="line-152"></span><p class="line862">The default behaviour for a command may usually be modified by adding a <strong>--<em>option</em></strong> to the command. The <strong>ls</strong> command for example has an <strong>-s</strong> option so that <strong>"ls -s"</strong> will include file sizes in the listing. There is also a <strong>-h</strong> option to get those sizes in a "human readable" format. <span class="anchor" id="line-153"></span><span class="anchor" id="line-154"></span><p class="line862">Options can be grouped in clusters so <strong>"ls -sh"</strong> is exactly the same command as <strong>"ls -s -h"</strong>. Most options have a long version, prefixed with two dashes instead of one, so even <strong>"ls --size --human-readable"</strong> is the same command. <span class="anchor" id="line-155"></span><span class="anchor" id="line-156"></span><p class="line867"> <h1 id="A.22Man.22_and_getting_help">"Man" and getting help</h1> <span class="anchor" id="line-157"></span><p class="line867"><img alt="Warning /!\" height="16" src="/moin_static198/light/img/icon_eek.png" title="Warning /!\" width="16" /> <strong>man <em>command</em></strong>, <strong>info <em>command</em></strong> and <strong><em>command</em> --help</strong> are the most important tools at the command line. <span class="anchor" id="line-158"></span><span class="anchor" id="line-159"></span><p class="line862">Nearly every command and application in Linux will have a man (manual) file, so finding them is as simple as typing <strong>"man "command""</strong> to bring up a longer manual entry for the specified command. For example, <strong>"man mv"</strong> will bring up the <strong>mv</strong> (move) manual. <span class="anchor" id="line-160"></span><span class="anchor" id="line-161"></span><p class="line862">Move up and down the man file with the arrow keys, and quit back to the command prompt with <strong>"q"</strong>. <span class="anchor" id="line-162"></span><span class="anchor" id="line-163"></span><p class="line867"><strong>"man man"</strong> will bring up the manual entry for the <strong>man</strong> command, which is a good place to start! <span class="anchor" id="line-164"></span><span class="anchor" id="line-165"></span><p class="line867"><strong>"man intro"</strong> is especially useful - it displays the "Introduction to user commands" which is a well-written, fairly brief introduction to the Linux command line. <span class="anchor" id="line-166"></span><span class="anchor" id="line-167"></span><p class="line862">There are also <strong>info</strong> pages, which are generally more in-depth than <strong>man</strong> pages. Try <strong>"info info"</strong> for the introduction to info pages. <span class="anchor" id="line-168"></span><span class="anchor" id="line-169"></span><p class="line862">Some software developers prefer <strong>info</strong> to <strong>man</strong> (for instance, GNU developers), so if you find a very widely used command or app that doesn't have a <strong>man</strong> page, it's worth checking for an <strong>info</strong> page. <span class="anchor" id="line-170"></span><span class="anchor" id="line-171"></span><p class="line862">Virtually all commands understand the <strong>-h</strong> (or <strong>--help</strong>) option which will produce a short usage description of the command and it's options, then exit back to the command prompt. Try <strong>"man -h"</strong> or <strong>"man --help"</strong> to see this in action. <span class="anchor" id="line-172"></span><span class="anchor" id="line-173"></span><p class="line867"><em>Caveat: It's possible (but rare) that a program doesn't understand the -h option to mean help. For this reason, check for a <strong>man</strong> or <strong>info</strong> page first, and try the long option --help before -h.</em> <span class="anchor" id="line-174"></span><span class="anchor" id="line-175"></span><span class="anchor" id="line-176"></span><p class="line867"> <h2 id="Searching_the_manual_pages">Searching the manual pages</h2> <span class="anchor" id="line-177"></span><span class="anchor" id="line-178"></span><p class="line874">If you aren't sure which command or application you need to use, you can try searching the manual pages. Each manual page has a name and a short description. <span class="anchor" id="line-179"></span><span class="anchor" id="line-180"></span><p class="line862">To search the names for <string> enter: <span class="anchor" id="line-181"></span><span class="anchor" id="line-182"></span><span class="anchor" id="line-183"></span><pre><span class="anchor" id="line-1-3"></span>whatis -r <string></pre><span class="anchor" id="line-184"></span><span class="anchor" id="line-185"></span><p class="line862">For example, whatis -r cpy will list manual pages whose names contain <strong>cpy</strong>. The output from whatis -r cpy will in part depend on your system - but might be as follows: <span class="anchor" id="line-186"></span><span class="anchor" id="line-187"></span><p class="line867"><span class="anchor" id="line-188"></span><span class="anchor" id="line-189"></span><span class="anchor" id="line-190"></span><span class="anchor" id="line-191"></span><span class="anchor" id="line-192"></span><span class="anchor" id="line-193"></span><span class="anchor" id="line-194"></span><span class="anchor" id="line-195"></span><pre><span class="anchor" id="line-1-4"></span>memccpy (3) - copy memory area <span class="anchor" id="line-2-2"></span>memcpy (3) - copy memory area <span class="anchor" id="line-3-2"></span>mempcpy (3) - copy memory area <span class="anchor" id="line-4-2"></span>[some lines removed] <span class="anchor" id="line-5-2"></span>wcsncpy (3) - copy a fixed-size string of wide characters <span class="anchor" id="line-6-1"></span>wmemcpy (3) - copy an array of wide-characters <span class="anchor" id="line-7"></span>wmempcpy (3) - copy memory area</pre><span class="anchor" id="line-196"></span><span class="anchor" id="line-197"></span><p class="line862">To search the names or descriptions for <string> enter: <span class="anchor" id="line-198"></span><span class="anchor" id="line-199"></span><span class="anchor" id="line-200"></span><pre><span class="anchor" id="line-1-5"></span>apropos -r <string></pre><span class="anchor" id="line-201"></span><span class="anchor" id="line-202"></span><p class="line862">For example, apropos -r "copy files" will list manual pages whose names or descriptions contain <strong>copy files</strong>. The output from apropos -r "copy files" will in part depend on your system - but might be as follows: <span class="anchor" id="line-203"></span><span class="anchor" id="line-204"></span><p class="line867"><span class="anchor" id="line-205"></span><span class="anchor" id="line-206"></span><span class="anchor" id="line-207"></span><span class="anchor" id="line-208"></span><span class="anchor" id="line-209"></span><span class="anchor" id="line-210"></span><pre><span class="anchor" id="line-1-6"></span>cp (1) - copy files and directories <span class="anchor" id="line-2-3"></span>cpio (1) - copy files to and from archives <span class="anchor" id="line-3-3"></span>gvfs-copy (1) - Copy files <span class="anchor" id="line-4-3"></span>gvfs-move (1) - Copy files <span class="anchor" id="line-5-3"></span>install (1) - copy files and set attributes</pre><span class="anchor" id="line-211"></span><span class="anchor" id="line-212"></span><span class="anchor" id="line-213"></span><p class="line867"> <h1 id="Other_Useful_Things">Other Useful Things</h1> <span class="anchor" id="line-214"></span><span class="anchor" id="line-215"></span><p class="line867"> <h2 id="Prettier_Manual_Pages">Prettier Manual Pages</h2> <span class="anchor" id="line-216"></span><span class="anchor" id="line-217"></span><p class="line862">Users who have <em>Konqueror</em> installed will be pleased to find they can read and search man pages in a web browser context, prettified with their chosen desktop fonts and a little colour, by visiting <strong>man:/<em>command</em></strong> in Konqueror's address bar. Some people might find this lightens the load if there's lots of documentation to read/search. <span class="anchor" id="line-218"></span><span class="anchor" id="line-219"></span><p class="line867"> <h2 id="Pasting_in_commands">Pasting in commands</h2> <span class="anchor" id="line-220"></span><span class="anchor" id="line-221"></span><p class="line862">Often, you will be referred to instructions that require commands to be pasted into the terminal. You might be wondering why the text you've copied from a web page using <strong>Ctrl + C</strong> won't paste in with <strong>ctrl+V</strong>. Surely you don't have to type in all those nasty commands and filenames? Relax. <strong>ctrl+shift+V</strong> pastes into a GNOME terminal; you can also do middle button click on your mouse (both buttons simultaneously on a two-button mouse) or right click and select <em>Paste</em> from the menu. However, if you want to avoid the mouse and yet paste it, use "Shift + Insert", to paste the command. If you have to copy it from another terminal / webpage, you can use "Ctrl + Insert" to copy. <span class="anchor" id="line-222"></span><span class="anchor" id="line-223"></span><p class="line867"> <h2 id="Save_on_typing">Save on typing</h2> <span class="anchor" id="line-224"></span><span class="anchor" id="line-225"></span><div><table><tbody><tr> <td style="text-align: left"><p class="line891"><strong>Up Arrow</strong> or <strong>Ctrl + P</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Scrolls through the commands you've entered previously.</td> </tr> <tr> <td style="text-align: left"><span class="anchor" id="line-226"></span><p class="line862"> <strong>Down Arrow</strong> or <strong>Ctrl + N</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Takes you back to a more recent command.</td> </tr> <tr> <td><span class="anchor" id="line-227"></span><p class="line862"> <strong>Enter</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> When you have the command you want.</td> </tr> <tr> <td style="text-align: left"><span class="anchor" id="line-228"></span><p class="line862"> <strong>tab</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> A very useful feature. It autocompletes any commands or filenames, if there's only one option, or else gives you a list of options.</td> </tr> <tr> <td><span class="anchor" id="line-229"></span><p class="line862"> <strong>Ctrl + R</strong></td> <td colspan="2" style="text-align: left"><p class="line862"> Searches for commands you've already typed. When you have entered a very long, complex command and need to repeat it, using this key combination and then typing a portion of the command will search through your command history. When you find it, simply press <strong>Enter</strong>.</td> </tr> <tr> <td style="text-align: left"><span class="anchor" id="line-230"></span><p class="line891"><strong>History</strong></td> <td colspan="2" style="text-align: left"><p class="line862">The <strong>history</strong> command shows a very long list of commands that you have typed. Each command is displayed next to a number. You can type <strong>!x</strong> to execute a previously typed command from the list (replace the X with a number). If you <strong>history</strong> output is too long, then use <strong>history | less</strong> for a scrollable list.</td> </tr> </tbody></table></div><span class="anchor" id="line-231"></span><span class="anchor" id="line-232"></span><ul><li style="list-style-type:none"><p class="line891"><em>Example</em>: you ran <strong>history</strong> and found you want to use command 1967. Simply enter <span class="anchor" id="line-233"></span><span class="anchor" id="line-234"></span></li></ul><p class="line867"><span class="anchor" id="line-235"></span><span class="anchor" id="line-236"></span><pre><span class="anchor" id="line-1-7"></span>!1967</pre><span class="anchor" id="line-237"></span><span class="anchor" id="line-238"></span><span class="anchor" id="line-239"></span><span class="anchor" id="line-240"></span><p class="line867"> <h2 id="Change_the_text">Change the text</h2> <span class="anchor" id="line-241"></span><span class="anchor" id="line-242"></span><p class="line874">The mouse won't work. Use the left/right arrow keys to move around the line. <span class="anchor" id="line-243"></span><span class="anchor" id="line-244"></span><p class="line862">When the cursor is where you want it in the line, typing <em>inserts</em> text - ie it doesn't overtype what's already there. <span class="anchor" id="line-245"></span><span class="anchor" id="line-246"></span><div><table><tbody><tr> <td><p class="line862"> <strong>Ctrl + A</strong> or <strong>Home</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Moves the cursor to the <em>start</em> of a line.</td> </tr> <tr> <td><span class="anchor" id="line-247"></span><p class="line862"> <strong>Ctrl+ E</strong> or <strong>End</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Moves the cursor to the <em><strong>e</strong>nd</em> of a line.</td> </tr> <tr> <td><span class="anchor" id="line-248"></span><p class="line862"> <strong>Esc + B</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Moves to the <strong>b</strong>eginning of the previous or current word.</td> </tr> <tr> <td><span class="anchor" id="line-249"></span><p class="line862"> <strong>Ctrl + K</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Deletes from the current cursor position to the end of the line.</td> </tr> <tr> <td><span class="anchor" id="line-250"></span><p class="line862"> <strong>Ctrl + U</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Deletes from the start of the line to the current cursor position.</td> </tr> <tr> <td><span class="anchor" id="line-251"></span><p class="line862"> <strong>Ctrl + W</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Deletes the <strong>w</strong>ord before the cursor.</td> </tr> <tr> <td><span class="anchor" id="line-252"></span><p class="line862"> <strong>Alt + B</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Goes <strong>b</strong>ack one word at a time.</td> </tr> <tr> <td><span class="anchor" id="line-253"></span><p class="line862"> <strong>Alt + F </strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> Moves <strong>f</strong>orward one word at a time.</td> </tr> <tr> <td><span class="anchor" id="line-254"></span><p class="line862"> <strong>Alt + C</strong> </td> <td colspan="2" style="text-align: left"><p class="line862"> <strong>C</strong>apitalizes letter where cursor is and moves to end of word.</td> </tr> </tbody></table></div><span class="anchor" id="line-255"></span><span class="anchor" id="line-256"></span><span class="anchor" id="line-257"></span><span class="anchor" id="line-258"></span><p class="line867"> <h1 id="More_ways_to_run_a_terminal">More ways to run a terminal</h1> <span class="anchor" id="line-259"></span><span class="anchor" id="line-260"></span><p class="line862">You can set your own keyboard shortcut to run a terminal. See <a href="/community/KeyboardShortcuts">KeyboardShortcuts</a> for details of keyboard shortcuts. <span class="anchor" id="line-261"></span><span class="anchor" id="line-262"></span><p class="line874">You can run more than terminal - in tabs or separate windows. <span class="anchor" id="line-263"></span><span class="anchor" id="line-264"></span><p class="line874">You can also install guake (GNOME), tilda (XFCE / LXDE/Mate) or yakuake (KDE) and have a terminal which appears and hides on shortcut key. This can be particularly useful if you use terminal a lot. Drop down terminals can make things a lot easier if you are trying to run a desktop enviroment with a non defualt window manager and something goes wrong drop down terminals can run the orginal window manager --replace to restore a previous option to make things much less painful. <span class="anchor" id="line-265"></span><span class="anchor" id="line-266"></span><p class="line867"> <h1 id="An_extremely_handy_tool_::_Incremental_history_searching">An extremely handy tool :: Incremental history searching</h1> <span class="anchor" id="line-267"></span><span class="anchor" id="line-268"></span><span class="anchor" id="line-269"></span><p class="line874">In terminal enter: <span class="anchor" id="line-270"></span><span class="anchor" id="line-271"></span><p class="line867"><span class="anchor" id="line-272"></span><span class="anchor" id="line-273"></span><pre><span class="anchor" id="line-1-8"></span>gedit ~/.inputrc</pre><span class="anchor" id="line-274"></span><span class="anchor" id="line-275"></span><span class="anchor" id="line-276"></span><p class="line874">Then copy paste and save: <span class="anchor" id="line-277"></span><span class="anchor" id="line-278"></span><span class="anchor" id="line-279"></span><p class="line867"><span class="anchor" id="line-280"></span><span class="anchor" id="line-281"></span><span class="anchor" id="line-282"></span><span class="anchor" id="line-283"></span><span class="anchor" id="line-284"></span><pre><span class="anchor" id="line-1-9"></span>"\e[A": history-search-backward <span class="anchor" id="line-2-4"></span>"\e[B": history-search-forward <span class="anchor" id="line-3-4"></span>"\e[C": forward-char <span class="anchor" id="line-4-4"></span>"\e[D": backward-char</pre><span class="anchor" id="line-285"></span><span class="anchor" id="line-286"></span><span class="anchor" id="line-287"></span><p class="line862">From now on, <strong>and many agree this is the most useful terminal tool</strong>, it saves you a lot of writing/memorizing... <span class="anchor" id="line-288"></span><span class="anchor" id="line-289"></span><p class="line874">All you need to do to find a previous command is to enter say the first two or three letters and upward arrow will take you there quickly: <span class="anchor" id="line-290"></span><span class="anchor" id="line-291"></span><span class="anchor" id="line-292"></span><p class="line874">Say I want: <span class="anchor" id="line-293"></span><span class="anchor" id="line-294"></span><p class="line867"><span class="anchor" id="line-295"></span><span class="anchor" id="line-296"></span><pre><span class="anchor" id="line-1-10"></span>for f in *.mid ; do timidity "$f"; done</pre><span class="anchor" id="line-297"></span><span class="anchor" id="line-298"></span><p class="line874">All I need to do is enter: <span class="anchor" id="line-299"></span><span class="anchor" id="line-300"></span><p class="line867"><span class="anchor" id="line-301"></span><span class="anchor" id="line-302"></span><pre><span class="anchor" id="line-1-11"></span>fo</pre><span class="anchor" id="line-303"></span><span class="anchor" id="line-304"></span><p class="line874">And hit upward arrow command will soon appear. <span class="anchor" id="line-305"></span><span class="anchor" id="line-306"></span><span class="anchor" id="line-307"></span><p class="line867"> <h1 id="How_to_create_upsidedown_and.2For_reverse_text_with_your_terminal">How to create upsidedown and/or reverse text with your terminal</h1> <span class="anchor" id="line-308"></span><span class="anchor" id="line-309"></span><p class="line874">If you wish or need to ever flip text upside down [vertical flip] "u蕧op 菨p谋sdn 蕠x菨蕠 d谋蕛蔁" or/and create reverse text here is a terminal way to achieve this. <span class="anchor" id="line-310"></span><span class="anchor" id="line-311"></span><span class="anchor" id="line-312"></span><p class="line874">Copy/paste and save the following as flip.pl in your home folder (thanks to Lars Nood茅n for script). <span class="anchor" id="line-313"></span><span class="anchor" id="line-314"></span><p class="line867"><span class="anchor" id="line-315"></span><span class="anchor" id="line-316"></span><span class="anchor" id="line-317"></span><span class="anchor" id="line-318"></span><span class="anchor" id="line-319"></span><span class="anchor" id="line-320"></span><span class="anchor" id="line-321"></span><span class="anchor" id="line-322"></span><span class="anchor" id="line-323"></span><span class="anchor" id="line-324"></span><span class="anchor" id="line-325"></span><span class="anchor" id="line-326"></span><span class="anchor" id="line-327"></span><span class="anchor" id="line-328"></span><span class="anchor" id="line-329"></span><span class="anchor" id="line-330"></span><span class="anchor" id="line-331"></span><span class="anchor" id="line-332"></span><span class="anchor" id="line-333"></span><span class="anchor" id="line-334"></span><span class="anchor" id="line-335"></span><span class="anchor" id="line-336"></span><span class="anchor" id="line-337"></span><span class="anchor" id="line-338"></span><span class="anchor" id="line-339"></span><span class="anchor" id="line-340"></span><span class="anchor" id="line-341"></span><span class="anchor" id="line-342"></span><span class="anchor" id="line-343"></span><span class="anchor" id="line-344"></span><span class="anchor" id="line-345"></span><span class="anchor" id="line-346"></span><span class="anchor" id="line-347"></span><span class="anchor" id="line-348"></span><span class="anchor" id="line-349"></span><span class="anchor" id="line-350"></span><span class="anchor" id="line-351"></span><span class="anchor" id="line-352"></span><span class="anchor" id="line-353"></span><span class="anchor" id="line-354"></span><span class="anchor" id="line-355"></span><span class="anchor" id="line-356"></span><span class="anchor" id="line-357"></span><span class="anchor" id="line-358"></span><span class="anchor" id="line-359"></span><span class="anchor" id="line-360"></span><span class="anchor" id="line-361"></span><span class="anchor" id="line-362"></span><span class="anchor" id="line-363"></span><span class="anchor" id="line-364"></span><span class="anchor" id="line-365"></span><span class="anchor" id="line-366"></span><span class="anchor" id="line-367"></span><span class="anchor" id="line-368"></span><span class="anchor" id="line-369"></span><span class="anchor" id="line-370"></span><span class="anchor" id="line-371"></span><span class="anchor" id="line-372"></span><span class="anchor" id="line-373"></span><span class="anchor" id="line-374"></span><span class="anchor" id="line-375"></span><span class="anchor" id="line-376"></span><span class="anchor" id="line-377"></span><span class="anchor" id="line-378"></span><span class="anchor" id="line-379"></span><span class="anchor" id="line-380"></span><span class="anchor" id="line-381"></span><span class="anchor" id="line-382"></span><span class="anchor" id="line-383"></span><span class="anchor" id="line-384"></span><span class="anchor" id="line-385"></span><span class="anchor" id="line-386"></span><span class="anchor" id="line-387"></span><span class="anchor" id="line-388"></span><span class="anchor" id="line-389"></span><span class="anchor" id="line-390"></span><span class="anchor" id="line-391"></span><span class="anchor" id="line-392"></span><span class="anchor" id="line-393"></span><span class="anchor" id="line-394"></span><span class="anchor" id="line-395"></span><span class="anchor" id="line-396"></span><span class="anchor" id="line-397"></span><span class="anchor" id="line-398"></span><span class="anchor" id="line-399"></span><span class="anchor" id="line-400"></span><span class="anchor" id="line-401"></span><span class="anchor" id="line-402"></span><span class="anchor" id="line-403"></span><pre><span class="anchor" id="line-1-12"></span>#!/usr/bin/perl <span class="anchor" id="line-2-5"></span> <span class="anchor" id="line-3-5"></span>use strict; <span class="anchor" id="line-4-5"></span>use warnings; <span class="anchor" id="line-5-4"></span>use utf8; <span class="anchor" id="line-6-2"></span> <span class="anchor" id="line-7-1"></span>binmode(STDOUT, ":utf8"); <span class="anchor" id="line-8"></span> <span class="anchor" id="line-9"></span>my %flipTable = ( <span class="anchor" id="line-10"></span> "a" => "\x{0250}", <span class="anchor" id="line-11"></span> "b" => "q", <span class="anchor" id="line-12"></span> "c" => "\x{0254}", <span class="anchor" id="line-13"></span> "d" => "p", <span class="anchor" id="line-14"></span> "e" => "\x{01DD}", <span class="anchor" id="line-15"></span> "f" => "\x{025F}", <span class="anchor" id="line-16"></span> "g" => "\x{0183}", <span class="anchor" id="line-17"></span> "h" => "\x{0265}", <span class="anchor" id="line-18"></span> "i" => "\x{0131}", <span class="anchor" id="line-19"></span> "j" => "\x{027E}", <span class="anchor" id="line-20"></span> "k" => "\x{029E}", <span class="anchor" id="line-21"></span> "l" => "|", <span class="anchor" id="line-22"></span> "m" => "\x{026F}", <span class="anchor" id="line-23"></span> "n" => "u", <span class="anchor" id="line-24"></span> "o" => "o", <span class="anchor" id="line-25"></span> "p" => "d", <span class="anchor" id="line-26"></span> "q" => "b", <span class="anchor" id="line-27"></span> "r" => "\x{0279}", <span class="anchor" id="line-28"></span> "s" => "s", <span class="anchor" id="line-29"></span> "t" => "\x{0287}", <span class="anchor" id="line-30"></span> "u" => "n", <span class="anchor" id="line-31"></span> "v" => "\x{028C}", <span class="anchor" id="line-32"></span> "w" => "\x{028D}", <span class="anchor" id="line-33"></span> "x" => "x", <span class="anchor" id="line-34"></span> "y" => "\x{028E}", <span class="anchor" id="line-35"></span> "z" => "z", <span class="anchor" id="line-36"></span> "A" => "\x{0250}", <span class="anchor" id="line-37"></span> "B" => "q", <span class="anchor" id="line-38"></span> "C" => "\x{0254}", <span class="anchor" id="line-39"></span> "D" => "p", <span class="anchor" id="line-40"></span> "E" => "\x{01DD}", <span class="anchor" id="line-41"></span> "F" => "\x{025F}", <span class="anchor" id="line-42"></span> "G" => "\x{0183}", <span class="anchor" id="line-43"></span> "H" => "\x{0265}", <span class="anchor" id="line-44"></span> "I" => "\x{0131}", <span class="anchor" id="line-45"></span> "J" => "\x{027E}", <span class="anchor" id="line-46"></span> "K" => "\x{029E}", <span class="anchor" id="line-47"></span> "L" => "|", <span class="anchor" id="line-48"></span> "M" => "\x{026F}", <span class="anchor" id="line-49"></span> "N" => "u", <span class="anchor" id="line-50"></span> "O" => "o", <span class="anchor" id="line-51"></span> "P" => "d", <span class="anchor" id="line-52"></span> "Q" => "b", <span class="anchor" id="line-53"></span> "R" => "\x{0279}", <span class="anchor" id="line-54"></span> "S" => "s", <span class="anchor" id="line-55"></span> "T" => "\x{0287}", <span class="anchor" id="line-56"></span> "U" => "n", <span class="anchor" id="line-57"></span> "V" => "\x{028C}", <span class="anchor" id="line-58"></span> "W" => "\x{028D}", <span class="anchor" id="line-59"></span> "X" => "x", <span class="anchor" id="line-60"></span> "Y" => "\x{028E}", <span class="anchor" id="line-61"></span> "Z" => "z", <span class="anchor" id="line-62"></span> "." => "\x{02D9}", <span class="anchor" id="line-63"></span> "[" => "]", <span class="anchor" id="line-64"></span> "'" => ",", <span class="anchor" id="line-65"></span> "," => "'", <span class="anchor" id="line-66"></span> "(" => ")", <span class="anchor" id="line-67"></span> "{" => "}", <span class="anchor" id="line-68"></span> "?" => "\x{00BF}", <span class="anchor" id="line-69"></span> "!" => "\x{00A1}", <span class="anchor" id="line-70"></span> "\"" => ",", <span class="anchor" id="line-71"></span> "<" => ">", <span class="anchor" id="line-72"></span> "_" => "\x{203E}", <span class="anchor" id="line-73"></span> ";" => "\x{061B}", <span class="anchor" id="line-74"></span> "\x{203F}" => "\x{2040}", <span class="anchor" id="line-75"></span> "\x{2045}" => "\x{2046}", <span class="anchor" id="line-76"></span> "\x{2234}" => "\x{2235}", <span class="anchor" id="line-77"></span> "\r" => "\n", <span class="anchor" id="line-78"></span> " " => " " <span class="anchor" id="line-79"></span>); <span class="anchor" id="line-80"></span> <span class="anchor" id="line-81"></span>while ( <> ) { <span class="anchor" id="line-82"></span> my $string = reverse( $_ ); <span class="anchor" id="line-83"></span> while ($string =~ /(.)/g) { <span class="anchor" id="line-84"></span> print $flipTable{$1}; <span class="anchor" id="line-85"></span> } <span class="anchor" id="line-86"></span> print qq(\n); <span class="anchor" id="line-87"></span>}</pre><span class="anchor" id="line-404"></span><span class="anchor" id="line-405"></span><p class="line874">Then to set it up: <span class="anchor" id="line-406"></span><span class="anchor" id="line-407"></span><p class="line867"><span class="anchor" id="line-408"></span><span class="anchor" id="line-409"></span><span class="anchor" id="line-410"></span><span class="anchor" id="line-411"></span><pre><span class="anchor" id="line-1-13"></span>sudo mv flip.pl /bin/ <span class="anchor" id="line-2-6"></span>cd /bin/ <span class="anchor" id="line-3-6"></span>sudo chown yourusername flip.pl && sudo chmod +x flip.pl</pre><span class="anchor" id="line-412"></span><span class="anchor" id="line-413"></span><p class="line874">Then open terminal and enter: <span class="anchor" id="line-414"></span><span class="anchor" id="line-415"></span><p class="line867"><span class="anchor" id="line-416"></span><span class="anchor" id="line-417"></span><pre><span class="anchor" id="line-1-14"></span>flip.pl</pre><span class="anchor" id="line-418"></span><p class="line874">else <span class="anchor" id="line-419"></span><span class="anchor" id="line-420"></span><span class="anchor" id="line-421"></span><pre><span class="anchor" id="line-1-15"></span>perl /bin/flip.pl</pre><span class="anchor" id="line-422"></span><p class="line874">Write what you want and hit return <span class="anchor" id="line-423"></span><span class="anchor" id="line-424"></span><p class="line874">Copy and paste wherever you want text document or Internet forum, etc... <span class="anchor" id="line-425"></span><span class="anchor" id="line-426"></span><span class="anchor" id="line-427"></span><ul><li style="list-style-type:none">晒菨蕠u菨 pu蓯 蕠u蓯蕧 no蕩 蕠蓯丧蕧 菨蕠谋晒蕧 <span class="anchor" id="line-428"></span>藱藱藱蓴蕠菨 莎n晒o蔁 蕠菨u晒菨蕠u谋 晒o 蕠u菨莎n蓴op 蕠x菨蕠 蕠u蓯蕧 no蕩 晒菨蕦菨晒菨丧蕧 菨蕠s蓯d pu蓯 蕩do蓴 <span class="anchor" id="line-429"></span><span class="anchor" id="line-430"></span></li></ul><p class="line874">================== <span class="anchor" id="line-431"></span><span class="anchor" id="line-432"></span><span class="anchor" id="line-433"></span><p class="line874">If you want to reverse back to front, write your text in a text editor and save as mytext to the home folder. <span class="anchor" id="line-434"></span><span class="anchor" id="line-435"></span><p class="line874">Then enter: <span class="anchor" id="line-436"></span><span class="anchor" id="line-437"></span><p class="line867"><span class="anchor" id="line-438"></span><span class="anchor" id="line-439"></span><pre><span class="anchor" id="line-1-16"></span>rev mytext</pre><span class="anchor" id="line-440"></span><span class="anchor" id="line-441"></span><p class="line874">Copy and paste the result, tluser eht etsap dna ypoc. <span class="anchor" id="line-442"></span><span class="anchor" id="line-443"></span><p class="line874">And of course you can combine both for truly cryptic results, 蓴od蕩 蓯up d蓯s蕠菨 蕠丧菨 晒菨sn蕛蕠 <span class="anchor" id="line-444"></span><span class="anchor" id="line-445"></span><span class="anchor" id="line-446"></span><p class="line867"> <h1 id="More_Information">More Information</h1> <span class="anchor" id="line-447"></span><p class="line874">Within the Community Help Wiki: <span class="anchor" id="line-448"></span><ul><li><p class="line891"><a href="/community/AptGetHowto">AptGetHowto</a> - installing packages. <span class="anchor" id="line-449"></span></li><li><p class="line891"><a href="/community/Repositories/CommandLine">Commandline Repository Editing</a> - adding repositories. <span class="anchor" id="line-450"></span></li><li><p class="line891"><a href="/community/grep">grep Howto</a> - grep is a powerful command line search tool. <span class="anchor" id="line-451"></span></li><li><p class="line891"><a href="/community/find">find Howto</a> - locating files. <span class="anchor" id="line-452"></span></li><li><p class="line891"><a href="/community/CommandlineHowto">CommandlineHowto</a> - another introduction to the terminal. <span class="anchor" id="line-453"></span></li><li><p class="line891"><a href="/community/HowToReadline">HowToReadline</a> - more advanced customization. <span class="anchor" id="line-454"></span><span class="anchor" id="line-455"></span></li></ul><p class="line874">Detailed tutorials on the Linux command line: <span class="anchor" id="line-456"></span><ul><li><p class="line891"><a class="http" href="http://linuxtutorial.todolistme.net">http://linuxtutorial.todolistme.net</a> - "Here you will learn the Linux command line (Bash) with our 13 part beginners tutorial ...". <span class="anchor" id="line-457"></span></li><li><p class="line891"><a class="http" href="http://mywiki.wooledge.org/BashGuide">http://mywiki.wooledge.org/BashGuide</a> - "This guide aims to aid people interested in learning to work with BASH. It aspires to teach good practice techniques for using BASH, and writing simple scripts". <span class="anchor" id="line-458"></span></li><li><p class="line891"><a class="http" href="http://linuxcommand.org/">http://linuxcommand.org/</a> - Learning the shell and writing shell scripts. <span class="anchor" id="line-459"></span></li><li><p class="line891"><a class="http" href="http://linuxsurvival.com/index.php">http://linuxsurvival.com/index.php</a> - "Linux Survival is a free tutorial designed for people who have little or no experience with the Linux operating system". <span class="anchor" id="line-460"></span></li><li><p class="line891"><a class="http" href="http://www.ss64.com/bash/">http://www.ss64.com/bash/</a> - "An A-Z Index of the Bash command line for Linux". <span class="anchor" id="line-461"></span></li><li><p class="line891"><a class="http" href="http://tinyurl.com/ycyg4mk">http://tinyurl.com/ycyg4mk</a> - "Top 3 Sites to Help You Become a Linux Command Line Master". <span class="anchor" id="line-462"></span><span class="anchor" id="line-463"></span></li></ul><p class="line867"><hr /><p class="line874"> <span class="anchor" id="line-464"></span><a href="/community/CategoryCommandLine">CategoryCommandLine</a> <span class="anchor" id="line-465"></span><span class="anchor" id="bottom"></span></div><div id="pagebottom"></div> </div> </div> <p id="pageinfo" class="info" lang="en" dir="ltr">UsingTheTerminal (last edited 2016-07-02 09:16:41 by <span title="??? @ 81-178-226-226.dsl.pipex.com[81.178.226.226]">81-178-226-226</span>)</p> </div> <div id="footer"> <p> The material on this wiki is available under a free license, see <a href="https://help.ubuntu.com/community/ License">Copyright / License</a> for details<br /><b>You</b> can contribute to this wiki, see <a href="https://help.ubuntu.com/community/WikiGuide">Wiki Guide</a> for details </p> </div> </div></body> </html>