{"id":1043,"date":"2007-11-22T19:36:16","date_gmt":"2007-11-22T19:36:16","guid":{"rendered":"http:\/\/scienceblogs.com\/gregladen\/2007\/11\/22\/linux-the-most-fun-you-can-hav\/"},"modified":"2007-11-22T19:36:16","modified_gmt":"2007-11-22T19:36:16","slug":"linux-the-most-fun-you-can-hav","status":"publish","type":"post","link":"https:\/\/gregladen.com\/blog\/2007\/11\/22\/linux-the-most-fun-you-can-hav\/","title":{"rendered":"Linux: The Most Fun You Can Have with your Pants On"},"content":{"rendered":"<p>Hey, wanna know some cool stuff you can do in a Linux terminal?<!--more-->First, three keyboard tricks you probably already know.<\/p>\n<ul>\n<li>The up arrow is a &#8220;history&#8221; key.  After you&#8217;ve entered some commands, you can retrieve them with the up arrow.  Most terminals will store the last several hundred commands.  You can, obviously, edit these (like if the first time you entered the command it did not work because you typed it wrong).<\/li>\n<li>The TAB is an auto completion key.<\/li>\n<li>Many terminals do NOT use ctrl-c for copy and ctrl-v for paste, for historical reasons.  But if you go to Preferences &#8211;> Shortcuts or in some cases Key Bindings, you can easily change this.<\/li>\n<\/ul>\n<p>Now for a much bigger, more powerful cool thing you can do.<\/p>\n<dl>\n<dt><strong>wget<\/strong><\/dt>\n<dd>The command <strong>wget<\/strong> gets stuff.  Type in <strong>wget<\/strong> and then any valid internet address, and whatever that address points to is immediately sucked into your home directory.  No questions asked.  There are many, many options you can run <strong>wget<\/strong> with but you don&#8217;t need them to get a single simple file (oh, it won&#8217;t over write a file with the same name on your computer &#8230; it will just add a dot-number to the end of the name of the newly downloaded file).Here&#8217;s an example.  I&#8217;ve got a PDF file on the web at this location:gregladen.com\/wordpress\/wp-content\/pdf\/Laden_Wrangham_Roots.pdfOpen a terminal, type <strong>wget,<\/strong> a space, then copy and paste this filename on to the terminal line and hit enter.  The PDF is 233K long.  Now type &#8220;ls&#8221; to get a directory and you&#8217;ll see the file.If you do this with a standard web page you may get &#8220;index.html&#8221; or something like that.  If you then open the index.html file in your web browser, you get to see what a web page looks like without a style sheet attached!  <\/p>\n<dd>\n<dl>\n","protected":false},"excerpt":{"rendered":"<p>Hey, wanna know some cool stuff you can do in a Linux terminal?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[57],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5fhV1-gP","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/1043"}],"collection":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/comments?post=1043"}],"version-history":[{"count":0,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/1043\/revisions"}],"wp:attachment":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/media?parent=1043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/categories?post=1043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/tags?post=1043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}