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
cd-change directory
chmod-change access permisions
clear-clear the terminal screen
cp-copy file(s) to another location
date-display date
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
man-help
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
source ~/.terminaltweaks
fi

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.

Comments

author
rapidprototyping (author)2012-03-25

I highly recomend getting the (Linux Bible) it has a cd and dvd with every iteraion of linux its live cd boots on any windows computer without efecting the bios and uses blank space on the harddrive as swap file so when its done there are no files remains as long as you dont save things your just booting from the disc. and from what i understand you can load this onto thumb drive allowing you to repair other windows pc's that are broken because you will be able to read the files and that inclueds error files that indicate what the is wrong in firast place. So if you want learn linux systems get a bible on amazon i got mine for ten bucks including shipping but normal price is twenty plus shipping well worth the price of admuission for history section alone.
everyone sems to get ride pc well before there usefullness is really used up. i was amazed how linux recognized my dvd usb port and video card licity split my monitor as well but grudgingly. this is great way to use old pc and with all the info in trhe bible and the resources it points out you can have full media pc if you read da book dat is da linux bible book

author
x z i t (author)2010-06-13

hey, my names tim :)

author
Hat maker boy (author)2008-11-25

I cant configure it, this is the output: austin@Austin:~/Phun$ ./configure bash: ./configure: No such file or directory

author

ok how did you make Ubuntu look so much like os x. i have feisty too but don't use it much because i don't get how to scan for aviable wi-fi networks. if you know how to scan for networks please reply

author

Q: How did you make Ubuntu look so much like osx?
A: Check out this site, that's what I did.
Q: How to scan for available networks?
A: Check this out

If this doesn't help please let me know and I'll try again

author
Thelrin (author)2007-07-14

. It's a great start, but needs more work. . I'm with gmoon, you need command examples. A screen dump usually does well. . The install step is good, but could use a little more explanation of the whys.

author
Thelrin (author)Thelrin2007-07-14

Sorry everybody, there was a bit of a mix-up. This comment was meant to be posted by Mitten instead of me.

author
sardines454 (author)Thelrin2007-07-14

if you want to collaborate it let me know, you can share you knowledge!

author
gmoon (author)2007-07-05

You could improve this by including a short example of the use of each listed command. Even the link to the external list doesn't have usage info.

At least add how to get help for a cmd using man ( su for instance):

man su

Will return the 'manual' for the su command. Works with the programs (man "cmd") on your list.

author
sardines454 (author)gmoon2007-07-14

if you want to collaborate it let me know, you can share you knowledge!

author
ll.13 (author)2007-07-04

Oh well, Terminal is also known as Konsole in KDE glxinfo will tell you the state of your graphics fglrxinfo (may not work for all distros) will tell you your graphics drivers glxgears is an app. which tests your graphics card. any program can be run by typing it's name in the terminal but you must keep the terminal up. to install a .run file put sh_(space) and drag the file into the terminal to compy the directory. that's enough for now.

author
sardines454 (author)ll.132007-07-04

what do you want me to do with that? add it in? add you as collaborator? what?

About This Instructable

40,343views

50favorites

License:

More by sardines454:Reduce By Your Carbon Footprint by Changing Your Eating HabitsLearn CPRButterfinger Milkshake
Add instructable to: