You lazy bastards.
OP shamelessly stolen from Visti (and Jasconius, I guess). Modified here and there by yours truly.
Handy commands and shortcuts:
Keep in mind that these are only the most basic forms of each command, and that they all have dozens of switches and caveats that enable you to do awesome things with them.
cd <directory> : change current directory to <directory>
ls : list directory contents
ls -a : list directory contents including hidden files
ls -l : list directory contents in detailed list format
mkdir <dirname> : make subdirectory <dirname> (can also specify full directory e.g. mkdir /home/thesquid/giantAngryBear)
rmdir <dirname> : deletes empty subdirectory <dirname>
cp <file> <dest> : copy <file> to <dest>
cp -r <directory> <dest> : copy <directory> and everything inside it to location <dest>
mv <file> <dest> : moves <file> to <dest>
rm <file> : removes (deletes) <file>
rm -r <directory> : removes (deletes) <directory> and everything inside it
chown <user> <file> : change user ownership of <file> to <user>
chgrp <group> <file> : change group ownership of <file> to <group>
chmod XXX <file> : change permissions of <file> to octal number XXX (probably best to 'man' this one)
touch : change file timestamp (and will create an empty file if it doesn't exist)
man : gives the manual page on any command including all of these ones (lol man mount)
man -k <string> : gives a list of all man pages with <string> in the title or short description
less : an extremely simple viewer of plaintext files, has regex searching and up/down movement
more : an even simpler viewer than less (now you get the less is more than more gag in bash)
view : a read-only version of vim, so has all the vim commands, but you can't edit the file
vim / emacs / pico / vi / nano : complex text editors that support enormously complicated yet awesome shortcuts, syntax colouring, the whole shebang
SYSTEM STUFF: (you will probably need to be root to take advantage of these)
top : display Linux tasks (equiv. to Task Manager) htop is a widely preferred and more interactive alternative
ifconfig : for configuring network interfaces (setting ip address, activating and deactivating network cards)
iwconfig : for configuring wireless network interfaces
iwlist : getting more info from a wireless network interface (especially seeing wireless networks in range)
route : show / manipulate the IP routing table
dhclient : DHCP client
lshw : list hardware
lspci : list all PCI devices
lsmod : list modules in Linux kernel
modprobe : add / remove <module> from Linux kernel
mount : mount a file system
umount : unmount a file system
wpa_supplicant : for connecting to WPA networks. Requires several reads of the man page, editing of a configuration file by looking at several example files for clarity, and possibly carving arcane symbols into your face.
tar : for making tarballs of a directory / several files
gzip : for compressing said tarball using *.gz
gunzip : for uncompressing a gzipped file
bzip2 : for compressing said tarball using *.bz2
bunzip : for uncompressing a bzipped file
tar xvfz <file> : for uncompressing a *.tar.gz file
tar xvjf <file> : uncormpressing a *tar.bz2 file
date : printing the date and time
ping : to ping
pwd : print out current directory name
killall <process> : kills all processes of name <process>
ps -aux : prints a snapshot of all current running processes
kill <jobid> : kills process of job id <jobid>. <jobid> can be found with ps -aux or top
which : locates a command
So you want to run linux?
* Searching for a file based on file name:
e.g. I want to find all the files in the current directory and any subdirectories that start with Photo and end in jpg, such as Photo322.jpg.
Command: find . -iname "Photo*.jpg"
English translation: find, starting in the the current directory (the "." argument), any files that match the name "Photo*.jpg" in a case insensitive fashion (the "-iname") argument.
Notes: It is very important if you are passing wildcards to find that you escape the wildcards by using \ or ". If you do not, then the shell will expand the wildcards on the command line and your command will then be the equivalent of:
find . -iname
* Doing the same operation on a bunch of files
e.g. I want to gzip up each text file in the current directory into their own separate archive
Command: for eachFile in *.txt; do gzip "$eachFile"; done
English translation: Take the list of files that are returned by *.txt. Go through each of those filenames in the list one by and one, and each time
1.) Assign the current filename to the variable called "eachFile". This can be accessed by $eachFile.
2.) Execute the command between "do" and "done". In this example, it is gzip "$eachFile".
Notes: "$eachFile" is enclosed in quotation marks so that any filenames with spaces get passed correctly to gzip. The semi-colons tell the shell that a command is done and to treat anything after the semi-colon as a new command. If you wanted to, you could have the loop do more than one command on a single line, like so:
for eachFile in *.txt; do gzip "$eachFile"; mv "$eachFile".gz .. ; done
Any more complexity, and you're probably at the stage where you should be writing a script instead of trying to fit it into one line.
* Displaying the contents of files/simple manipulation of standard input
Head will show, by default, the first 10 lines of a file, or if no filename is provided, then standard input.
Tail will show, by default, the last 10 lines of a file, or if no filename is provided, then standard input. Useful for looking at log files.
cat will dump the entire contents of a file to standard output (typically the screen, but often not). If no filename is provided, then it will basically echo standard input to standard output.
This is useful in creating simple files. e.g. I want to create a file called "hello.txt" containing the line "This is a test"
cat > hello.txt
This is a test
(Ctrl-D signals end-of-file).
To *append* something to an existing file:
cat >> hello.txt
This will be the second line of the file
Note the >>! If you just use >, you will overwrite the file, instead of appending.
* Displaying something to screen
echo Hello world!
The echo command will echo whatever arguments is passed to it back to the standard output. Typically used in scripts to show status reports.
Chaining it all together!
Let's list the first ten lines of every text file in the current directory and pretty it up with a header.
for eachFile in *.txt; do echo "*** Ten lines of $eachFile ***"; head "$eachFile"; done
Oh crud, it went by too fast to see it! Hang on - we know that we can use 'less' to view text files
for eachFile in *.txt; do echo "*** Ten lines of $eachFile ***"; head "$eachFile"; done | less
Tada! (push 'q' to quit from less, by the way).
Replace with appropriate options for those times you want to sort mp3 files, or photos, or whatever.
Well, the easiest way to do that is to download a linux distro, burn it, and boot it. Some have "live" cds, others don't. Where can you find a distro? Here are a few to get you started:
Ubuntu is the leader in the field right now and is often suggested to newcomers. It's the easiest to set up, can be run from within windows without too much hassle (if necessary), as makes for the easiest transition from the two big proprietary operating systems.
Fedora is another of the major distros - Also a fine beginner's choice. They're a little more strict with the "open-source only" philosophy, and thus, a little less simple to jump to, straight from Windows. It also has a bit of a reputation for being kinda "bleeding edge" at times, sometimes to its detriment. That being said, it's still very easy and waaayyy
more than capable of being an internet/email/pictures box.
Debian is an old dog, but stable as hell. Ubuntu is built on a Debian foundation. Debian is known for its strong views on only including free packages with the distribution.
Opensuse is another rather popular distro, though it's scoffed at by a few purists who dislike Novell's dealings with Microsoft. Many others, like myself, aren't bothered by that at all. I haven't tried it in a long time, but people who do use it seem to be quite loyal to the brand. This is good beginner's distro.
Mandriva is sort of an old hand in the linux world, somewhat like Fedora and Slackware. Back in the day, you would typically use one of three distros... Red Hat, Mandrake or Slackware, and Mandriva is what became of Mandrake. I haven't used it since 2003 or so, but it was plenty good back then and I've heard nothing bad about it since. Perfectly fine for newcomers or oldbies alike.
Arch Linux is an increasingly popular distro, but is often not recommended unless you know what you're doing as it requires a good deal of setup. Their wiki is awesome, though. If you want an advanced, minimalist (out of the box) distro, you could do a lot worse than Arch. Definitely not for beginners.
Slackware is one of the oldest linux distributions; in fact, it's almost as old as linux itself. There's a saying that "Slackware is linux." This is similar to Arch linux (or rather, Arch is similar to this), only Slackware is easier to install and setup. This isn't a distro for beginners, but that being said, if you're patient it's not impossible. It was my first real distro, and I'm no genius.
Gentoo linux is for nerds. If you enjoy compiling everything from source before you've got any OS going at all, including the kernel, then give it a shot. It's kinda like Arch, except more difficult. If you want to learn about your computer and the deeper workings of linux (and maybe Unix), it's worth trying at least once or twice.
Those are the big dogs. For some smaller, but still perfectly serviceable dogs, check these out:
What is a distrolette? It's a distribution that is a spin-off of another, or built on top of another. Often, distrolettes are more specialized than their parents, or more "dumbed down" for the masses.
That's right, we've got Ubuntu twice in this OP. Ubuntu is built on top of Debian, and always has been. Great distro for beginners.
Linux Mint (everyone calls it Mint linux) is an Ubuntu spinoff. Long story short, it comes with all the good, proprietary stuff installed by default that Ubuntu doesn't for legal or philosophical reasons.
Chakra is Arch linux for people who are lazy and like KDE. It's really quite impressive, though the last time I checked, also buggy. That was a while ago, so that might be fixed by now.
Crunchbang is a somewhat minimalist but full-featured distro currently based off of Debian. It used to be based off of Ubuntu, but they've changed that very recently. Currently my favorite distro, for no good reason in particular.
Puppy Linux is small and quite lightweight, meant to be installed on systems that haven't had a spring in their step for quite some time now. The latest release is named 'Lupu', since it's evidently a mashup of the old Puppy Linux + Ubuntu's Lucid Lynx.
Trisquel is the only distro listed in this OP that meets Richard's Stallman's rigid definition of what makes a Free OS 'Free'. What it boils down to is, basically, it's harder to install flash in Trisquel than it is in Ubuntu. Nonetheless, I've got it installed on my laptop and haven't yet found a reason to replace it, as it's actually quite good. It too is based off of Ubuntu.
But what does it look like?
See, that's an interesting question because Linux can look in a lot of different ways. More so than just referring to themes and colour schemes and such, the entire user interface can change depending on which desktop environment you choose to use. Here are a couple of screenshots of the main ones:
Gnome - one of the two most popular linux desktop environments, there has been a bit of a schism in the Gnome community as of late. Specifically, the release of Gnome 3 has been met with some controversy for a number of reasons that won't be enumerated here; suffice to say, Gnome itself now has two distinct flavors: 2.3.x
Gnome 2.3, under Ubuntu 10.10:
Gnome 3, from Gnome.org's website:
KDE - a bit more tweakable than Gnome, I'm led to believe. Recently in it's fourth incarnation - Looks like this:
Openbox - a popular lighter DE. Can
look like this, but is extremely flexible, so it's hard to have only one screenshot:
There are several others if you don't like those. Here's a little sampler:
Unity (Ubuntu's new shell):
Here is a list of programs that some of the forumers have found useful for one thing or another.
Command-line browsers (lololol): Links
, Claws Mail
Command-line email: Mutt
- VideoLan client. Plays everything. I install this on every machine I use, no joke.
- A quintessential linux video player. Very good, and what I fall back on when - god forbid - VLC doesn't work for some reason.
- Mplayer is great, but can be a little tough to work with sometimes... especially if it's not working properly. SMPlayer is a frontend that makes MPlayer more convenient to use.
- A damn fine multi-track video editor. It's not quite Final Cut Pro or Sony Vegas, but it's a hell of a lot better than Windows Movie Maker.
- Another video editor. I prefer Kdenlive to this, though others disagree. This is a bit simpler, and therefore, may be quicker for fast Youtube vids.
VLC or Mplayer will also work for audio. There's also:
- A run-of-the-mill yet entirely functional iTunes-esque (from what I hear) music player. It comes pre-packaged with a lot of distros, and if it doesn't, is almost certainly available in your repos. The version packaged with the newest Ubuntu also has a music store plugin.
- Similar to Rhythmbox or any other database-music-player-thing, but more lightweight.
- A fork of BMP, which is a fork of XMMS. Essentially, Winamp for linux.
- Audacity needs no introduction, since if you've ever done any basic audio editing, you've probably done it with Audacity regardless of OS.
- Command-line text editor, very powerful, fast, etc. But don't listen to me, let this guy
sell it to you. Gvim is the popular GUI front-end for Vim, and it is quite good.
- Also command-line (has front-ends available), also powerful, flexible, etc. Emacs has been a top hacker's tool de jour for more than 25 years, and a GUI front-end exists for this as well if you're scared of the command-line. Emacs/Vim flame wars are purportedly legendary, so don't get people started.
- A very simple command-line based text editor. It's great for very simple edits.
- Gnome text editor. It's typically what I use even when I'm not running Gnome, and is a popular go-to GUI text editor for basic (and slightly less basic) tasks.
- Similar to Gedit, except for KDE. More advanced, I think.
- A very simple, lightweight GTK+ text editor. Essentially, Notepad for linux. This is what I use when I'm stuck on an old, shitty machine.
- A fork of OpenOffice, this is supposedly where all the talent fled to (or rather, what they founded) after Oracle refused to be a part of the Document Foundation. This is also a full office suite.
- Cross-platform MS Office clone/replacement. Full office suite, and all that you'll ever likely need for processing texts unless your job forces you to buy Microsoft.
- AbiWord is a word processing program, similar to MS Word. It's not a full office suite, so if you'd prefer something different from Libre/OpenOffice or only want a word processor, this is a decent way to go.
- The GIMP (GNU Image Manipulation Program) is a F/LOSS Photoshop clone. Not as feature-packed, and perhaps less than perfect for professionals, it's still more than enough for damn near everyone that uses Photoshop.
- A decent, lightweight photo management system.
- A photo batch processor. Need 5,000 images scaled down, desaturated and converted from .png to .jpg? Phatch can do that, and quite a lot more.
- Flowcharts and diagrams.
- A calculator.
- Tablature editor and player. Good for guitarists.
- Editing Latex files.
- Programming language. I think.
- "There is no need for any apps beyond awk and screen. What els eciuld you possibly want
- MySQL Administrator.
- A QuickSilver/Launchy/etc. clone (launcher).
- Another launcher, preferred by some over Gnome-Do.
Sadly, the number of options the linux gamer has available to him or her (mostly him
, let's not kid ourselves) is limited. That is not to say, however, that no options exist. Some companies are surprisingly linux-friendly, and actually do release linux executables and/or open-source their engines (in the case of Id).
But you're interested in games you can get right now
, aren't you? Fair enough.
The Linux Game Tome (http://www.happypenguin.org/
For many people though, the sheer number of games on that site - along with the amount that are completely shit
... sorry, but it's true - can be overwhelming, so we've decided to list a few games that suck noticeably less right here. These aren't strictly linux-only so much as just games that are available on linux.
Penny Arcade Adventures: On the Rain-Slick Precipice of Darkness
- Pretty good action adventure games developed by HotHead and designed by the PA guys themselves (Mike and Jerry). There were supposed to be four episodes in total, but as of March 2010 the other episodes were postponed indefinitely.
- Not exactly brand new, but a classic. It's a bit of a hassle to get working though... worth it in my opinion.
World of Goo
- You know this game already. Get it, it's pretty good.
The Penumbra series
- Suspenseful, Lovecraftian (I guess?) horror FPS'. I hear good things.
- Platformer starring a ball of... tar, or.. trash, or something. It's decent from what I've played.
Eschalon, Books I & II
- Very old-school, stat-heavy clickfest RPGs. Not up everyone's alley, but I'm digging Book I so far.
- An indie, underwater metroidvania. Pretty good from what I've played so far, though I had a bitch of a time installing it and getting it to run, personally. If you encounter a bug when trying to launch that whines about an inconsistency, check out this bug page
Unreal Tournament 2004
- A quite good arena-style FPS. If you're a gamer, you probably already know all about the UT series.
- This is also a pretty well-thought-of property. A Battlefield clone.
Everything in the Humble Indie Bundles
- Seriously, click the link, and check out the games. The Humble Frostbyte Bundle as well.
- Needs no introduction. This game is worse than heroin for the first week you play it. Pay your bills early because you probably won't leave the house for a while.
Cave Story (Doukutsu)
- Needs no introduction.
Battle for Wesnoth
- Strategy game, oh my! It's free, open-source (I think), and you can even install it from your repo most likely.
UFO: Alien Invasion
- XCOM homage (knockoff). I've played about 10 seconds of it, but it's easy to install, easy to run, and looks quite promising.
- A pretty cool Shmup. It's probably in your repos.
- Imagine Quake 3. Now imagine Quake 3 with way shittier character models and audio that's not quite as good. That's basically OpenArena. It's worth checking out if you're into Q3.
- I think it's also based off of Id's Quake 3 engine (might be Quake 2, not sure), although they've taken the style for this game in a more original direction. My personal favorite of the Quake 3 knockoffs.
Frets on Fire
- Guitar Hero clone.
- A SimCity clone. I wasn't a huge fan of it when I tried it, but I couldn't tell you why exactly... probably because I've spent some time playing SimCity 3000 Unlimited, which is what this is aping.
- Puzzle Bobble clone. Pretty fun actually, worth adding to your collection.
- If you've played Super Monkey Ball, you'll know what to expect from Neverball... which, in my mind, equals "Monkeyball minus the annoying wannabe-mascot-bullshit." Monkeys piss me right off. The file also includes Neverputt, which is basically mini-golf. Both games are great time wasters.
Secret Maryo Chronicles
- Though better than SuperTux by quite a margin, this would still be a pretty middle of the road platformer (below average even, by today's standards) if not for the fact that it's such a shameless Mario World ripoff.
- DDR clone.
- Worms clone. Worms is great, so this is worth looking at.
- An empire-building strategy game inspired largely by Civ 2, thus the name.
Dungeon Crawl Stone Soup
- I'm not a big fan of Roguelikes myself, so I'll let Frem sell it: "a great roguelike. It has a really nice graphical tiled version, too. Getting it compiled can be a pain, though. You may want to reference the Arch Linux PKGBUILD.
More to come.
Not a fan of penguins?
That's alright, not everybody is. Me, I don't mind as long as they're not dancing. Either way, Linux is not the only Unix-like in town.