Quick Summary of Basic and Common Linux Commands

There are many commands that are used in linux on a daily basis, ones that everyone should know just to get by. Like back in the days of DOS, you had to know how to work with the command line and how to navigate around. Learning new commands is always hard, especially when there are so many new ones that don't always seem to make sense in their names.

cd

Change directory - this command is essential for traversing folders and moving about your linux computer. Its quite straight forward, cd /where/you/want/togo or cd .. to go up a level. It's pretty basic, but be aware of absolute and relative paths. If you are currently in the folder /home/puppy/pictures then you can type cd .. to move up to /home/puppy/ or you could type cd /home/puppy/ not to mention cd ~/puppy/. You must learn how to traverse folders effectively before you can use the operating system.

ls

The ls command gives you a directory listing. This command has many options, but basically provides you with the same information as the "dir" command in DOS. The most common use of ls is probably "ls -la" infact many people have an alias setup, so whenever they type "ls" it actually runs "ls -la".

du

The disk usage command gives you a summary of how much space a program or some piece of data is using. Normally this command uses the -h feature, which simply means it will tell you if the number it gives you is in bytes, kilobytes, etc. -h gives you the human readable output.

mv

Move! The mv command is the move command, but it is far more powerful than the old DOS commands. You must be very careful when using the mv command, if you tell it to move a program to a new location, it will overwrite the stuff that was there, if the same file name exists. In addition the mv command is also the rename command! If I type: mv file1 file2 I just moved or effectively renamed file1 to file2!

date

The date command displays the current date and time of your server to the screen, and can be formatted in many ways, but date by itself will display something similar to: Sat Apr 30 23:58:41 EDT 2005

cp

The copy command is a great program, and is very powerful. Often used with the -R (recursive) option, it can be used to copy single files, or entire paths around with ease.

rmdir

Remove directory is a command that I personally don't use very often. To remove a directory it must be empty, rarely do I take the time to empty a directory before I delete it. Instead I use a variation of the rm command.

rm

This is the mother of all linux commands. Remove. You must always be very careful when you use this program. There aren't too many options with this program, its quite straight forward, you use it to delete things. -R is recursive and -f is force. If you want to clear a big folder and you are 100% sure you want it gone in a hurry, type: rm -Rf /directoryname

chgrp

Change group - this command is used to change the group ownership on a file. For the most part this is more of an administrative thing, and end users don't typically have to worry too often about this. You must know about the design of the linux file system before you worry about the chgrp command.

chown

Change owner - this command very similar to the chgrp command, and changes the owner instead of the group. Again you must really understand the design of the linux file system before this becomes really important. File ownership is an important part of security and permissions in linux.

mkdir

Make directory - this is a very straight forward command in linux, easy to use, just mkdir newfoldername

vi

This is a text editor in linux, its extremely powerful, but not exactly user friendly. I highly suggest that you take the time to learn this program, or at least the most common features. If you want to play with this program, you might get stuck inside it, remember these words. Escape, Colon, q, ! ( escape key, :q! ) That gets you out of interactive or insert mode, then gets you to the menu, then quit without saving!

su

Switch user - the su command lets you login from your account to another account. If you are root, you can type su - username and jump to any account without a password. If you are a normal user account and want to go to root then type su - root. If you do not put the hyphen then you will not use that users environment. Generally if you are logging in as a user it's a good idea to be in their working environment!

pwd

Print working directory - this command gives you the current directory you are working in.

$ pwd - me running command

/home/username/my_pics - this is the output from that command

As I mentioned earlier, there are so many different commands to learn, it really just takes time and effort to play with them and learn their options. The manual (MAN) pages in linux are really great and full of information. Many of the most common commands are located in the /bin folder, check it out!

Ken Dennis http://KenDennis-RSS.homeip.net/

In The News:

Marin Software Needs Help  Seeking Alpha
Software engineering makes games more exciting  Centrum Wiskunde & Informatica (CWI)
Software takes personal invasion into a new dimension  Hawaii Tribune-Herald (subscription)
HSBC Plans Software Bonfire  Computer Business Review

What To Do When Windows Wont Boot

When Windows fails to boot it is normally caused by... Read More

How Do I Get Rid Of That Darn Spyware?

Ad-Aware and Spybot are probably the two most well known... Read More

Microsoft CRM and No-Frills Cadillacs

In today's business world it's all but impossible to escape... Read More

MicroWorld Releases New Version of MailScan Ver. 4.5 - Antivirus and Content Security Software

MicroWorld Technologies, Inc. the leading solutions provider in the area... Read More

Daffodil DB: Web Database

What is a Web Database?A web database is a database... Read More

Software Development in 2005 - Back to the Future

2005 ? Back to the Future.What does the future hold?... Read More

SQL scripts for Project Accounting: Microsoft Great Plains series ? overview for developer

Microsoft Business Solutions Great Plains has Project Accounting module where... Read More

IBM Lotus Domino or Microsoft Exchange?

IBM Lotus Domino or Microsoft Exchange?The severe competition continues for... Read More

Most Dangerous Types of Spyware are on the Rise: How to Choose the Weapon

Bad News - the Threat is Bigger than it SeemedHow... Read More

Microsoft Great Plains: Service Business Customization & Integration Example

Microsoft Business Solutions Great Plains might be considered as ERP... Read More

Editing Your Photos Using Microsoft Picture It Publishing Platinum 2002 - A Great Dinosaur

I started using PIP (Picture It Publishing) Platinum 2002 right... Read More

Reduce TCO: The Java Database Way

TCO (Total Cost Ownership) is the buzzword in... Read More

Basic Steps To Optimize Your Internet Security

After seeing many people complain about their weak Internet security... Read More

How to Make Own CMS

Every day millions of new web documents emerge on the... Read More

Microsoft Great Plains SOP: Sales Order Processing

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

Linux for Home Users

Hey Guys! Don't raise your eyebrows or fear by hearing... Read More

Lotus Domino Implementation and Development: Infrastructure ? Present and Future

Domino server is a buffer between the operation system and... Read More

Save Your Resources - Combine Your IM Clients

There are so many different programs that clutter up your... Read More

Linux ? Keyboard Or Mouse

Just stress testing one of the latest Linux distributions. Been... Read More

Two Reasons to Use Timesheet Software

This short paper will expand on two key reasons to... Read More

Make 2005 the Year You Save Time!

Today's business world is fast-paced. No matter what it is... Read More

Microsoft Great Plains Integration with Legacy Systems ? Overview For Developer

Looks like Microsoft Great Plains becomes more and more popular,... Read More

Databases ? How We Love to Hate Them!

You've finally created databases that you can actually use to... Read More

How to Tell You Have Spyware, Ad-ware or Viruses

Usually, the easiest way to tell you have spyware is... Read More

Microsoft CRM Customization Secrets ? Second Edition

This article is for advanced Microsoft CRM SDK C# developers.... Read More