Introduction: Linux Terminal Basics
When I first intalled linux I was looking through the applications and came across the terminal. The terminal will be the main focus of this instructable. While the terminal can be used to do great things, these great things can be good or bad. For example using the terminal you can copy files, install programs, unzip and extract packages, but you can also delete files that are crucial to the system. so until you learn a decent amount about this topic don't use the terminal as root unless absolutely necessary. For this you will need: a computer, a linux distro installed on your computer(I will be using Ubuntu Feisty Fawn 7.04), and common sense. I will stage this instructable in three main steps: basic commands, installing packages(zip files in windows), tweaking your terminal to your liking. Since this instructable will mainly be text based don't expect a lot of pictures. If you do however have a suggestion please post a comment.
Step 1: Basic Terminal Commands
Keep in mind that the following commands are just a few of the many that exist. I included these because they are often the most frequently used. If you would an entire list go here.
cal-display a calendar
cat-display contents of a file
chmod-change access permisions
clear-clear the terminal screen
cp-copy file(s) to another location
echo-display a message in the terminal screen
exit-close the terminal window
find-search for file(s)
install-(this is where common sense is used...)
ls-list info for file(s) from whatever directory you are in
netstat-displays network statistics
ping-test network connection
su-change to root user
su (user name)-change to name in parentathes
wget-retrieve files from the internet
Step 2: Installing That New Package You Downloaded!
OK, that you have learned you basic linux commands you are feeling ambitious and decide to download a linux program from the internet. Once it downloads though you have no idea on how to install it. First though I am going to make some assumptions: the file you downloaded ends in .tgz, this is like a winzip file but called a package linux, and that you have a basic understanding of the aforementioned commands. Now to begin, here's how.
1. You must acquire the file you can do this by downloading it from the internet or by using the the wget command. If you choose the later option just type wget (download URL). The file you just downloaded is called coolthing-5.3.tgz.
2. Now we will extract and compile the file. To do this type tar -xvzf coolthing-5.3.tgz. The x will extract it, the v will verbose the zipped contents, z, of the archive file. Now press enter, the terminal should display a bunch of stuff on what it is doing.
3. Next we will change the directory to coolthing-5.3.tgz. Do this by typing cd coolthing-5.3.tgz.
4. Now it is time to configure the program. Do this by typing ./configure. The terminal will then give you more output but unless you get an error you can just ignore it.
5. The time has finally come to install your program. First type in make, then press enter. This will generate the binary program. Next time su, press enter, type in your root password then press enter again. You are now commanding as root, this is required to execute the next command. Type in make install, this will place the program's binaries in their correct locations. The program should now install and be ready to run.
Now that you have a basic understanding of how your terminal works you may want to edit some features. If so continue to the next step!!!
Step 3: Customizing the Terminal
Before we start I would like to say that I am not responsible for any damage that may occur to your system while following these instructions.
Terminal customizations can be added two ways: directly to the .bashrc file, located in /home/user name/.bashrc, or by writing a separate script and having .bashrc refer to it. For this we will be using the second method. First off I would like to say that I got this idea from lifehacker so I will provide the original terminal tweaks file as well as my modified one. Unfortunately for you you will have to download the text files and resave them in your home directory either as .LifehackerTerminalTweaks or .terminaltweaks, depending on which you downloaded. Once downloaded and resaved you can now put them to use. First go into your home folder and find a file called .bashrc (if you can't find it try turning on hidden files, see pic below), open it and add the following script to the bottom.
if (insert square bracket here) -f ~/.bashrc (insert square bracket here); then
For the script above where it says "(insert square bracket here)" use the square parentheses. I can't actually write them in because the instructables text editor reads it as a link. Sorry.
Now save it. When you open the terminal now it should appear different, with a calender, welcome message, etc. If you don't like the way it customized you terminal you can just delete the script you added to the end of .bashrc. If you want to customize it further open up either .LifehackerTerminalTweaks or .terminaltweaks. Unless you really now what you're doing when you go to customize these scripts I don't recommend cnanging anything except the welcome message area. This displays the message displayed on the terminal screen upon startup.
One last thing, changing your terminal's background and text colors. I am going to show you this because my friends frequently ask me how to do it. First open up your terminal, right click and select "edit current profile...", now click on the colors tab. Uncheck the box that says use colors from system theme. There should now be two clickable boxes below, one for text and one for the background, select the colors you would like and click the close button.
Ta da, you now have a basic understanding the terminal and have customized it to suit your needs. Any question please post a comment or PM me.