Wednesday, November 10, 2010

Linux CLI (Command Line Interface) Part 2

(Note: This is a continuation of “CLI Part 1”. It would be best for beginners to review the first installment before continuing) CLICK ANY IMAGE TO ENLARGE

Checking System Stats

Like many users people what to know the status of their systems and hardware. So the first thing we are going to cover is how to check system information from the CLI. Up front I would like to mention the programs we are going to be using to check system stats. The commands are as follows: free, top, df, and ps. Before we begin I would like to break down what each of the previous stated commands are for. Free, is for checking RAM and Swap usage. Top, is like the “Processes” Tab in Windows Task Manager, It will show current applications in use and what resources they are taking in real-time. DF, shows mounted file-systems with information on their capacity and total amount used, such as you Hard-Drive or USB Flash Drive and others. Finally, PS, will list all current processes/services loaded with their current PID number, and will allow you to have the option of terminating a process or service if it is either hung, frozen, or in limbo. Keep in mind top can do the same thing but is a bit more difficult to use. I will get to that later.

Free is a great tool that to my knowledge comes with every flavor of Linux. As stated its used to check system memory used as well as swap space. Free is straight forward. Simply type “free” in the command line and you will be represented the following information:



As you can see on the “- / + buffers/cache” under the “used” and “free” columns I currently have 320,500 Kb (Kilobytes) of RAM currently taken, and 641180 Kb of RAM available. It's simple and easy to use. You don't really have to do a Kb to Mb (Megabyte) conversion to get the exact amount. There are 1024Kb in 1 Mb, so if you know that, you can get an estimate of how much is taken/available.

Top, unlike the ps command, allows you to watch resources and applications in real time. Just like ps, in Top you can kill processes from it, but it can be difficult to filter the list because there are more things running then you realize and using ps is just an easier way. Below is a picture showing what the interface of the Top command looks like.



If you notice across the top you are given more information then just applications. As I said everything in top is displayed in real time, so on a side note it will cause your CPU usage to spike. On the top you will find number of  users logged in, total amount of tasks, ram information, program states (sleeping, stopped, zombies), and more. It is a very useful tool. Along with just showing applications it shows their PID, owned user, percent of memory used, CPU cycles used and more. If you wish to kill off an application that is near the top of the list and is visible, press the “k” key to open the “kill” function. All you have to do is enter the PID number next to the process you wish to kill and that's it. Now lets move on to “df”.

It's always nice to see how much disk space you have available. Just to make sure you are not running out, an see if you are needing to get rid of some things or buy another hard-drive. With that you can run the simple command, df. DF will show all mounted file-systems, their total capacity and how much is taken. By viewing the below image you will see what I mean.



As you can see on the first line in the output area, you can see that my partition “/dev/sda1” (sda meaning the first drive and 1 meaning the first partition) is mounted on “/”. Like I said you can see the available space field, and used field which is given by a percentage. Other then that there is not a whole lot more use you can get out of it for just that basic purpose.

Now ps is a good command for finding running process if they need to be killed off. It's sad but true, that Linux isn't perfect. Applications do crash from time to time. Unlike Windows however, it can be recovered with no reboot necessary. There are different flags or arguments you can use with ps and I prefer “-ax”. The argument -a displays all w/ tty except session leaders and -x displays processes w/o controlling ttys. I won't get into what all that means at this time but I thought I would at least explain them. Executing the command in this fashion will look like this:



The list goes off the screen as you can see. If you a looking for a specific program you can pipe it into the grep command. If you are say looking for firefox it would look like this, “ps -ax | grep firefox”. Just on a side note to use the pipe symbol you press shift along with the “ \ “ key. I will go into using the pipe feature in a future CLI session. Anyways back to subject. As show in the picture, if I wanted to kill say the Gedit program that has the file “New Blog Post.txt” open I would type in “kill 1709”. You kill the PID associated with the target program and you find it by looking at the correct line so it was,
“1709 ? S 0:00 gedit /home/user01/Desktop/Next Blog Post.txt”. The first number on the line is the PID connected with that application.

Well that about wraps up system status tools so now we go on.

Finding and Installing Software
 
There are many different types of package managers out there and they are all different in their own way. For this session I will be covering “Apt”. This is used mainly in Debian based distributions. I may discuss managers like “yum” at a later date. First thing is first, I am going to cover how to find software before installing it. Kind of makes sense, no? I would like to point out at this time you will need some sort of higher privilege to use the apt program. An again I am going to assume you have “sudo” access. Sudo allows you to run a program as a higher privilege level. It will ask you for your personal user account password to continue to execute the command at a sudo level. I will warn you, don't use sudo for every command, only use it when it is absolutely required. Just a security precaution.

Now, when you are looking for a program you need to use key words. I will give an example. Say you want some video editing software, you are going to issue and apt command with some key words, such as “video” and “editing”. The command to look for such software is: “sudo apt-cache search video editing”. When you issue such a command you will get results like this:



After your search you will be given a list of packages, if any. On the far left is the package name and next to it is the package description. Now trying software and installing is easy thanks to the creation of package managers. When it comes to installing software it use to absolutely ludicrous. Having to install the correct version, finding all its dependencies, compiling, and linking everything properly was a headache but you can pet an thank your package manager for helping to fix all of that. To install a package its a simple as typing “sudo apt-get install (package-name)”. Just simply drop in the package name in the list displayed from your “apt-cache search” command and let apt do the rest.

Once its done you are set. You have successfully downloaded and installed your first package. If you ever wish to uninstall a package simply use "sudo apt-get remove (packagename)".

How to run Program from a Terminal

This section won't be very long so enjoy it. Running a program for a terminal is not difficult at all. For example, if you have say the Firefox Web Browser installed, all you have to type is “firefox” and press Enter. … … … That's it. Nothing more to it. Just like using the “Run” feature in windows. However you will notice that running a program in this fashion takes control of your terminal window. If you wish to run a program and still have terminal functions, use the “&” symbol at the end, like we covered in Part 1 of this series. To use it, the command would look like this, “firefox &”. Tada! You know have full control over your terminal window once again while staring a new application.

How to Use and Create Symbolic Links

First off you are probably asking, “What are symbolic links?” To put simply, they are almost like shortcuts in Windows. An you can create these symbolic links to have faster access to files, folders, or executables and it's not that difficult. For this tutorial we will be just making a symbolic link for a given folder. So lets get started. As shown in this picture below we will be creating a symbolic link in one folder to direct us to another.



As you can see in the first line we are using the command “ln”. It is used when creating symbolic links. We then follow it with a “-s” for soft-link. Not using this flag creates a “hard-link” and linking to a directory MUST be a soft-link. Again, in the first line I am linking a directory in my hidden wine (Windows API program) folder to my current location. When using ln your target file/directory is first and then you put your destination last. When I preform an ln, you can see our newly created link called “windows” in the Blog folder, our current location. Now when I cd (change directory) to our symbolic link “cd windows” it takes me right to “/home/user01/.wine/drive_c/Program\ Files/” without having to type in it's full path I just demonstrated. So again they are basically shortcuts to the specified folder or file.

Well that about wraps up Part 2 of the CLI HowTo. You get a bonus prize if you stayed with me for this long. See you next time. And,

Embrace the power of the CLI!

Distro Experience & Sources



Many people in my opinion, are intimidated by the Linux world. When I mention to friends and family if they have every used Linux in their life time I get, "I don't know anything about programming." or "I wouldn't know what to do, I have never used it before.". Those statements are perfectly understandable. However, Linux is becoming easier to use for new and unfamiliar users by the day. Some Linux distributions that have been released such at Mint, Ubuntu, Fedora and many others, really strive to make the unknown Operating System tolerable and much more user-friendly. On top of that, the types of hardware that are now supported with Linux is greater than ever.

Take laptops for example. With my personal experience, getting a Linux distro to work on a laptop was an absolute headache. It was usually the hardware that was the source of the problem. Hardware such as the integrated graphics chips, the Wireless card, and the sound card. Not to mention the "Hot bar" that is on most laptops that provide shortcut buttons for specific functions.

Lately I have been using a dirto named Mint, and the version I am currently using is 9. Codenamed Isadora, which is wonderful. My first test with the distro was to install it on my laptop. That is usually my first test. Not only was it able to understand everything but installing the graphics card driver was a snap. All I had to do was enter the built in hardware tool, and Mint scans for any hardware that requires a driver. It pointed out that my GFX card needed one. All it took was a single button click and a reboot. I was ready to go.

A week or so after the laptop trial, I added it to my main PC and again, everything went perfectly. I am still currently using it at this point in time. Mint has since released their next version. Currently in RC stage. Other then that lets move on to sources that can help you out when it comes down to trying linux or just getting your daily information.

Distrowatch[dot]com : What a helpful site for keeping up with the latest distro news and popularity trends. This site is a must use. You can browse almost all of the public and common used flavors out there. When you do select a distro, it will provide you the current and past versions of the selected flavor you have picked. Including a list of commonly request applications that come pre-installed, along with that apps version. Link

Kernel[dot]org : This site is straight forward. The name about wraps it up. You can check the current (Stable or Dev) releases for any kernel version out there. Also included are download links to any version you need. Link

Linux[dot]org : Just like the kernel site, this one too speaks for itself. On this page you can find the basic information and breakdown about the Linux OS, what it offers, and news about updates and software. Link

Linuxforums[dot]com : If you ever run into a problem or just an issue in general, this is a good source to go to. Here you can chat with other Linux users, about Programming, Problems, Configuration, Suggestions and more. If needed people located here will gladly help you with an issues you might be having. Although if you are using the Ubuntu distro lets say, I would recommend going to their official forum first. Otherwise its a good site to check out. Link

Monday, November 8, 2010

.iso's and Wine



(WARNING: Only make copies of production CDs/DVDs for your personal use ONLY. I will not be responsible for any redistribution of copy-right material.) 

Hey everyone welcome back. For this post I will be showing you how to make an .iso (Disc Image) of a game CD and be able to use it instead of a physical disc to play the game. Keep in mind that some discs have things to try and prevent copying such as soft-bits. You will also need the programs DD, and the Windows API program Wine, in order to run windows applications. (You can obtain these programs from your distributions package manager if they are not already installed) Other then that, lets get started.

First things first. We need to create a folder to mount our .iso that we will create. For now lets do everything within you personal "Home" folder. As you see in Figure 1-1 we need to issue the command mkdir to creat a directory. For this example lets name it mnt-iso. (command is: mkdir mnt-iso) Good, you have now created the directory we are going to mount our .iso file to.

For this demonstration we will be making a .iso image of a disc from the game "Morrowind". The first thing we will do is insert the Morrowind CD into our CD or DVD rom drive. Once the disc is inserted we will need to create a copy of the disc. To do this we will issue the command, (dd if=/dev/cdrom of=Morrowind.iso). For the command DD, "if" means input file, and "of" is equal to the output file. The program DD, or data dump, will try to create an exact image of your CD or DVD bit for bit.

Doing the above process may take some time. Depending on how fast the disc is spinning, your drive speed and a few other factors. Once the image is created it is time to mount our image. As shown in Figure 1-1, we will need to issue the following command to mount our newly created .iso image. (mount -t iso9660 -o loop Morrowind.iso mnt-iso/) Please note, if you are not in your home folder you will have to give the full path. (In most cases you will need Admin "Root" privileges to mount something, so don't forget that)

Now that the .iso image is mounted, we need to let Wine know that the mnt-iso folder we created is a Virtual CD-Rom Drive. To do this we need to run the command (winecfg) in the command line to enter the Wine configuration tool. (See Figures 1-2 to 1-4 for more information) Once in winecfg, we need to goto the "Drives" tab at the top of the window. Once there click the "Add" button and choose a Drive Letter. Once created we need to give our newly created drive some more input. If you choose say drive letter "F:", click the letter F from the window above. Now click the "Browse" button and navigate to the "mnt-iso" directory we created earlier an click OK.

We are almost done. Next Click the "Show Advanced" button and change the type from Auto to CD-Rom. After that click Apply in the bottom right corner of the "Winecfg" menu and then click Ok. You are finished. Now eject the Physical "Morrowind" disc from the CD-rom/DVD drive and try to launch the game. If all was successful the game should run without the physical disk. You are now running off a digital copy of the physical disc on your hard-drive. That about wraps it up.

This trick can be used on things other then games. You can also use the .iso creating method to backup your physical discs. Hope you enjoyed and good luck.

(Click any to Enlarge)
Figure 1-1

Figure 1-2

Figure 1-3

Figure 1-4


Friday, October 29, 2010

Gotta love IM Bot Spam

Ok just thought I would share this with you all because I found it quite funny. I was on my Linux installation this morning. (Mint 9) An keep in mind I also have Windows 7 installed but like I said, wasn't using it at the moment. I had Skype open because I was waiting for a friend to sign on this morning. When all of a sudden I got this message.

(CLICK TO ENLARGE)


To me this is one of those things that goes in my book of just hilarious incidents. Stupid bots that just assume things like me using a Windows OS at that point in time. Some of the others I have documented are like copying a .iso (Disc Image File) from the NAS server (Network Attached Storage) on my network and the estimated time to complete the copy was 1342 Years, 189 Days, 11 Hours, 21 Minutes and 31 seconds. Just things like that.

Well hope you got a kick out of it.

Thursday, October 28, 2010

Linux, Security, and You





Is Linux more secure then Windoze? (Yes. I said Windoze, not a typo) Yes it can be. Considering that over 90% of the current PC market do use a Windows Operating System but that doesn't mean that Linux is invulnerable. (MAC Included) Just like Windows, Linux has it fair share of threats out there. If a PC is connected to a network of any kind, is introduced to non-production stamped disc (a burned disc) and uses external media (USB Flash Drives, Floppy, etc) it is not invulnerable.

There are companies out there that make AV (Anti-virus) and other protection software for Linux. An some even offer a free one-year "Personal" license. Such as Panda, BitDefender, and AVG, just to name a few. There are Open Source alternatives too like F-Port and ClamAV. I guess you could use the term "The nail that sticks out the farthest gets hammered down first." (aka Windows). Although its more complicated then that and I'll tell you what I mean.

When it comes to Windows, many of the PCs that run it out there are very similar. Meaning that they get pushed to install the latest patches, similar packages are installed, and tend to all run the same software/services. So in theory that would make Windows an easy target. If all the PCs are similar, then the likely hood of a virus or exploit effecting all the targeted systems is really high.

Linux on the other hand is a different story. With Linux occupying around less then 1% of the current consumer market, they also differ from one another. For example, people use different kernels, distributions, packages, aren't using the same software, and don't all have the same services running. So there for if say the exploit was targeting a specific program with a targeted version and a kernel version of X, then the exploit will succeed. An again do to the fact that Linux is so customizable and people don't have to stick to a regimen of packages/patching requirements, the likely hood of success is just so low.

Still, that doesn't mean, as stated before, you are safe. There are some things you can do to help protect yourself from possible future problems. Make sure to use AV software, back up your files/partitions, check for root kits, and do these thing in a regular manner. It is possible to set these things to run automatically but it's not always a good idea. You don't want to set a scan or function to "autorun" and later find out that for some reason it had an issue and hasn't run for 2 months. Programs like these need human interaction to make sure they stay up to date and run regularly.

An one more thing. So many people I have talked to say that they don't use AV or other protection methods because they don't visit malicious websites or services. I got new for them, you don't have to be doing anything dangerous to get infected. It could be as simple as say a website you visit displays ads. An the server or service they use to display those ads gets compromised. Now you visit that site and there is hidden code in the advertisements that will execute and cause your PC harm. I have even seen people get hit with something just scrolling through their Google search results. Bad things can happen no matter where you go or what you do.

So be safe, take the necessary precautions and keep those exploits and dangers away.

Tuesday, October 26, 2010

Do you use Open Source software?

People are wrong if they believe that the future of software is anything but open. The power and versatility of Open Source software is amazing. Now I'm not saying that all FOSS (Free and Open Source Software) programs are worth using. The general populous believes that the only way to get software is what is available on a store shelf. Which is so not true. You may have FOSS running on your computer right now and you might not even realize it. If you are using the Firefox Web Browser, that is a FOSS project. An it's not the only one. There is a FOSS application out there that can do what current software you paid for does.

On a side note I would like to talk about "computer games" for a minute. Now keep that in mind "GAME". That leaves the door wide open for possibilities. What do I mean by this? Take the classic games Asteroids for example. I consider it to be a good computer game (Arcade originally) just as much as some of the games that new technology has to offer. An by that I mean games like Crysis or Modern Warfare 2. Yes the visuals are stunning but I dislike the fact that such games I specified blind people on the true meaning of a fun and entertaining game. So many people out there claim that games have to have good "graphics" or "visuals" as I call it, just for it to be fun and enjoyable. An I got news for them that is just a ridiculous argument and it's just not true. Not to say that visuals are not an important factor. They are, but shouldn't be the only factor that has to be met for someone to give a game a try. Same thing goes for people who don't want to try things like MAC OS or mainly Linux because they are intimidated. The longer people are use to and glues to proprietary software the harder it is for them to let go and make a change or even simply just to give it a try. I have friends that I have personally asked if they have tried Linux in their life time and they reply with, "No I don't know anything about programming." Which proves my point. With modern distros such as Mint or Ubuntu, learning Linux has never been more user friendly. It's a perfect time to start.

Finally I would like to address support. As stated above, people are intimidated by Linux. An if I had any advice or guidance to share, it's that you are not alone. The amount of open source communities out there is just crazy. If people have issues with their Operating System, Hardware, Software, there are human beings out there willing to help you with your problems. If there is anything I have learned while using Open Source software or just computers in general, if you ever encounter a problem, the chance of you being the ONLY case is next to null. So give it a try, It's free and you have nothing to loose. Well except for hard disk space and that's easy to get back.

Monday, October 25, 2010

Emergency Tech Support Creativity

Ok I'll try to keep this short. An this isn't English class so mind my grammer. Plus I'm a bit tired. Long day.=)

So my friend Adam calls me up at 5PM on a Sunday night and tells me that the video card for his laptop has crapped out. Nothing showing on the LCD display and the video out ports are non-functioning. Then he lays it on me. That he need to have a working computer for school by midnight, because he has to head back down to Bloomington so he can get some sleep and make his class in the morning.


Once I got to his house, the first thing I did was get his laptop hard-drive out of the laptop to get his personal files off of it. When he tries to use his parents Windows Vista PC to access his hard-drive, he can see the root file system but when he tries to go down a directory it freezes. (I came prepared) I brought my Linux Mint 9 Laptop with me. An wouldn't you know it he could access his files right away. It took some time but he backed up his files to his personal external (USB powered) hard-drive. Once his files were backed up it was time to find him a PC to work with.


He goes into his room to find his old eMachine PC that gave him crap years back. So I try booting up the eMachin but the onboard (motherboard) video adapter is screwed, so only a video card (AGP) is an option. The first card I try is an weird off-brand ATI card. It worked at first but then began to fail after a few reboots. An got so bad the OS could not load successfully with it in the PC. So I asked Adam if he still had the Nvidia 6200 I sold him years back. An he said yes … if he can find it.... (sigh) Luckily he found it but the onboard fan is burnt out. Well that's just great! Good thing was we were able to use the card to get the OS configured, install WINE (Windows API program which stands for Wine Is Not an Emulator) to make sure he can still use his college applications. Like interactive text books and all that jazz. An by the grace of god the apps worked flawlessly.


Unfortunately now the graphics card is starting to overheat so I convinced Adam that we will need some things from the local electronic store, if we want to keep it cool. (Fry's) Just to make sure I get the right GPU cooler I bring the Nvidia card with us. When we get there the store is getting ready to close. I look around and can't seem to find the GPU coolers anywhere. So I decided to ask a sales rep where they are and he replies that they don't carry them anymore. The second he said that I hear the store is closing in 10 minutes.


So I start to get an idea of what to do. I told Adam we need a case fan. I took some time to find one of a good size to cover the GPU and ram modules along with a good amount of airflow. An last but not least some thermal grease to replace the dried up/flaking off grease that was already on the card. So we stand in line and pay for the items. We were on a 12$ budget and got it all for 12$. Once we got back I told him I was going to need a paper towel to remove the old grease. Once the old grease was removed I polished it up with a shammy I brought with me. The clearer the surface the better the contact and heat transfer. I applied some fresh thermal grease and clip the heat-sink back onto the card. At about this Adam started to draw “Tux” the Linux mascot on the front panel of the eMachine that we took off earlier.


As for the fan I needed some way to elevate it to allow it to have proper airflow. The small screws it came with wasn't enough height so I had Adam go get some tall wood screws out of the garage which did the trick. After we got the cooling taken care of I proceeded to finish configuring Linux Mint 9 that we install on the PC because we didn't have a copy of windows on hand. Once the computer was all configured and set it was about 11:30PM by the time I left. An well that's about it. =)

Tuesday, October 19, 2010

Game Input: Urban Terror


Type: FPS
Platforms: Windows, Mac & Linux
Open Source: Yes
Game Engine: GPL
Content: Proprietary
Played on: Linux
Site: UrbanTerror


This being my first FOSS (Free and Open Source Software) game overlook I'll keep it to a minimum.

From first glance I was impressed. For me it has just about every standard feature thrown in with a few unique ones. Lets start with the weapons. If you were to just pick up this game and run with it, you would have no limitations. All of the weapons are not "locked" in any way and readily available for your use. The weapons range from SMGs, Shotguns, Grenade Launcher, and Rifles. Plus there are accessories and extra items you can equip for battle. Some of those items would be a laser pointer, body armor, extra ammo, suppressor, and the list goes on. Don't get too excited, there isn't too many extras. I was a little turned off considering there is no use of the sights on the usual weapons, you are basically always firing from the hip. Although sniper rifles are the only acception. The maps are well consturcted and look great. You will find good particle effects, anlong with good music in some levels and the sounds effects arn't bad. Not to mention that there are plenty of user created maps as well. So expect to download a few here or there when connecting to a server. Some of the features I like is the fact that when you get shot and bleed, it can be fatal if left untreated. You are supplied bandages when you spawn. Which can be applied to yourself or other teammates. Also the wall jump and power slide is nifty. Comes in handy with some situations. I didn't experience a whole lot of lag, at least none I could really see. I would recommend UrbanTerro, it's fun, easy to set up, no registration required and Open Source. You can't beat that.

So go have fun and rack up some frags maggot!

Overall: Good title worth trying.

Error Problems with Windows and Linux

This is something I have noticed over the years. Windows and Linux are quite different when it comes to errors or problems with the Operating System.

First lets start with Linux. When it comes to problems with Linux, if something is wrong, a driver has an issue, or just an overall problem occurs, you tend to have to stop and fix the issue before continuing. I have noticed this trend from time to time with my experience with Linux

Now Windows on the other hand, is a little strange. People can have BSoDs (Blue Screen of Death) and little error messages that just pop up from time to time and people just find ways to work around the errors and not fix the issue. Then you notice the PC get slower, less responsive and finally at some point just grinds to a halt.

The way I see it is that if Linux has a problem, you have to take the time to stop and correct the issue. Where as for Windows, errors can be ignored and the Windows OS just slowly implodes on itself until you reach a point where it just doesn't function anymore. Like say Windows gets stuck in a vicious reboot loop. The PC reboots, loads windows and in the process of loading at the boot splash stage, it reboots again and again. I have seen it happen to a family member PC before in the past.

I thought it was funny but the family member didn't seem to agree.

Mint 9 (Moving from Gnome to Fluxbox)

Here recently I was unaware that Mint has released a different X11 interface versions of their distro. I wanted to move to Fluxbox for less resource consumption and was not sure how to do it beside just going with the standard Fluxbox package. So I asked on the "official" forums and got a good response. I would also like to point out Fluxbox has been around for some time. I was first introduced to it when using DSL. (Damn Small Linux)

Switching interfaces was (for me) with "Isadora", quite simple. As simple as pulling down the correct packages and installing them one at a time. I would like to thank the user "shane" on the forums for the help.


To get the packages from the Fluxbox edition to install, I was pointed to the following link. Fluxbox Packages

Forum conversation: Link

So if you would like to apply fluxbox you can either use the package manager to get the baseline version of Fluxbox or install the packages from the link above.

Keep in mind those packages worked for me and again I'm running Mint 9 Isadora 32-bit. So you may not get the same results. It's possible for something to, well, go wrong or maybe break something in the Gnome instillation as "shane" pointed out.

Enjoy.

Linux CLI (Command Line Interface) Part 1

Hello everyone. For now I am just going to talk about the basics. This will be some basic commands you will find yourself using regularly. The CLI (Command Line Interface) is VERY powerful and should be leveraged. If you don't use it, well then it's time to make a change. =)

Ok the commands I will be covering are:
ls, cd, cp, mv, rm, rmdir, unzip, zip, clear, and the use of the &.

NOTE: Keep in mine "everything" in the command like "IS" case sensitive. So if a file or folder is capital, you must do the same when using commands.

ls: List directory

"ls" is like dir in windows it shows you the contents of a directory. Can you use dir ? Yes you can but it won't give you as much detail. "ls" has extra parameters that give you more detailed results (almost all programs do) but we wont get into that right now.

cd: Change Directory "cd [directory path]"

"cd" allows you to change from one directoy to another. Keep in mind that in Windows you change directories with a \ "backslash". Linux is not the same, we use a / "forwardslash" here, so be sure to keep that in mind. If you are changing to a directory that is already in your current location you don't need a / in front of the directory name. You only need to include it if you are coming from the root directory. (aka the beginning of the file system, not the root directory as in /root) Kind of like starting at C: in windows. You start there and then move to Documents and Settings or Windows directories.

mv: Move "mv [file or folder] [destination location]"

"mv" allows you to move files and directories to other locations. In order to use it you have to include the source file/folder and then the destination location. So say you wanted to move your family.jpg picture file from your "Home" directory to your "Picture" directory. To use the mv command it would look like this, "mv family.jpg Pictures/". So "family.jpg" being the file name and "Pictures/" being the destination. Notice there is no / before the "Picture" Directory and no path before the file name. That is because you are already in the location of both the file and directory.

rm: Remove "rm [filepath]"

"rm" grants you the ability to remove a file. Just files, there is a different command to remove folders, which we will get to in a bit. in order to remove a file you must use the rm command followed by the path to the unwanted file. An example would be "rm /home/user01/file.txt" or if you are in the current director where the file is located it would look like "rm file.txt" Simple no ?

rmdir: Remove Directory "rmdir [target directory]"

"rmdir" works similar to the rm command. One thing you need to be aware of is that if you are removing a directory say "rmdir /home/user01/Folder", Folder being the directory you wish to remove, it MUST be empty in order for the removal to be successful. Just an FYI.

zip: Zip archive program "zip -[0-9] [archive name] [file(s) to add]"

"zip" is a good way to combine files into an archive to either save space or just make things less cluttered. If you wanted to create and archive for a file called "myvideo.avi" it would look like this "zip -9 myzipfile.zip myvideo.avi". The "myzipfile.zip" is what you want to call your archive, and the file following that field are the file(s) you with to compress or store into a zip archive. Now notice the -9, what that means is to use the best compression possible. Using a -1 through -9 determines the compression strength. 1 being the lowest and 9 being the highest. If you choose to not compress at all you would use the -0 parameter to simple store the file(s).

unzip: Unzip a .zip archive "unzip [archive name] [specific file (optional)]"

"unzip" is quite easy to use. If you have a zip file you wish to uncompress/unpack there are a few ways to do it. A simple "unzip myzipfile.zip" will uncompress/extract its contents to your current directory. If the file contains say more then one file and you only want to extract a few files or just one it would look like the following, "unzip myzipfile.zip textfile01.txt". So say instead of extracting the files textfile01.txt through textfile08.txt it will only extract textfile01.txt

clear: Clear Screen

"clear" as for this command there is not much to it. Simply type "clear" in the command line and press Return and it will clear the screen give you a fresh terminal.

Other tips: The ampersand "&" function

You can launch your programs from a terminal window. Say you would like to launch the VLC Media Player. If you simply type "vlc" into a terminal and press return, it will launch the program. However, that terminal can not be use because it's focus is running the "vlc" program. An if you close the terminal it will close "vlc". So what can you do ? If you add an ampersand "&" after a program it will cause the program to run in the background and you get your terminal back. So the command should look like this "vlc &". It's that simple.

Well that about wraps up "Part 1" on using the Linux CLI. I will go into more depth about other programs and parameters in the next installment. So take care everyone, I hope this had helped you.

And always embrace the power of the CLI!