When I read flashback's tutorial on creating the 'perfect' Linux box, I thought it needed something extra: a basic tutorial on using the Linux Command Line, since it is one of the features of Linux you must know. Well, you don't have to, but eh. It's a lot easier if you know it.
For this, I'll be using DSL (Damn Small Linux), and bash (Bourne-again shell). You can grab a copy of DSL from http://damnsmalllinux.org, and if you want to try it out, here is a windows-embedded version - http://distro.ibiblio.org/pub/linux/distributions/damnsmall/current/dsl-embedded.zip.Okay, let's get started!First, boot into DSL. When you are greeted with the Desktop, double-click the Terminal icon, or right click and choose it from the menu (XShells). So now you've got a terminal window open… but you don't know where you are! So we'll print the working directory -pwdYou should see a $ sign (dollar) next to where you type your commands. This signifies that you are logged in as a normal user. If you want to switch to a super user (root), you'll have to log out, or use commands like su and sudo. If you are logged in as root, you should see a hash (#), not a dollar sign ($).So, now we know where we are, we might want to find out what is in our working directory. Like so -lsThat lists all the files/dirs in the current working directory. If you're looking for something a bit more readable (in your opinion) and informative, you might try this -ls -lIf you're in a directory with a lot of files, you can use a feature called piping. It works like this -ls -l | lessSo that pipes the output of ls -l into the program, less, which allows you to navigate through the file.Now we'll create our own directory for testing purposes -mkdir testsThat creates a directory called tests in the current working directory. Now we'll change our position to the directory -cd testsIf you want, you can print the working dir again using pwd, or list the things in there by ls. But the problem is, there is nothing in there! So we'll solve that problem by creating a simple text file -echo "Hello" > helloworld.txtecho repeats whatever you tell it to to the screen, but in this case, we're using it to create a file called helloworld.txt. Now we'll copy it.cp helloworld.txt helloworld2.txtThat copies the first file and copies it to the second file. Now, we could rename helloworld2.txt to something -mv helloworld2.txt something.txtMoving the file is the same as renaming it in Linux. So, print the list of files in the dir again, just for good measure -ls -lNow, you might want to delete a file. You can achive that, by doing this -rm something.txtBut you might want to delete a whole directory. Change to the dir above the tests folder -cd ..And then try removing the tests directory -rm testsIt returns an error, because the directory still has files in it. You can work around that like this -rm -rf testsBoom, and the directory is gone. You might want to edit a file now, and you can do this very simply via an editor called Vim.Create a new text file (you should know how by now, if not, read back), and then do this -vim filename.txtThis should open Vim. Now, Vim is a bare-bones text editor, and it can be complicated, but you can peform some complex things in a few keystrokes. To command vim, just type something in and press enter. Here is a list of some commands -i - Enter insert modeEscape - Exit insert modeup, down, left, right - Move the cursorw - Move the cursor right one wordb - Move the cursor left one word^ - Move the cursor to the start of the line$ - Move the cursor to the end of the linex - Delete the character on the cursordd - Clear the line:w - Save the fileZZ - Save the file and exit:q - Exit:q! - Exit without savingPlay around with Vim for a bit. There are other text editors, like nano.You may want to kill some frozen processes from the terminal. This is easy. First, use this command -psTo print a list of processes and their PID (Process IDentification) number. Once you have the PID of a process, you can kill it, like so -kill [PID]If you're in X windows (GUI), you can also use this, to click on a window, to end it's process -xkillAnyway, this is the endof this tutorial. Maybe I'll make another one. If you spot an error, just tell me in a comment or PM.Keep L337,Firebird out![GETLINUX]
Pwnt.
Haha, may us Linux users rise!Well, I downloaded Damn Small Linux. Not as good as Fedora Core, obviously, but it takes up less space, so I'll stick with it instead :D