Linux Basics article

Posted by VISITOR on Oct 27, 2005 4:24 PM EDT; By natas
Mail this story
Print this story

Only the most basic stuff is covered here, the original article was for Oracle Administrators new to Linux.

Linux Basics - Linux what is it, and history
* What is Linux?

* Linux is a free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the world. Developed under the GNU General Public License , the source code for Linux is freely available to everyone.
* Linux and its origins:
* Linux is an operating system that was initially created as a hobby by a young student, Linus Torvalds, at the University of Helsinki in Finland. Linus had an interest in Minix, a small UNIX system, and decided to develop a system that exceeded the Minix standards. He began his work in 1991 when he released version 0.02 and worked steadily until 1994 when version 1.0 of the Linux Kernel was released. The current full-featured version is 2.4 (released January 2001) and development continues.
* Why Linux:
* Cheap Solution
* More stable and reliable than the more common MS OS
* Customization: ex. Why cripple yourself with a GUI don't have to have one in Linux. Thats one customized thing that you can do with Linux that you cannot with MS Windows. If I need to allow all my resources to go only to my Database and HTTPD server then why would I want to run a GUI when its going to take up CPU cycles, Memory ect?

* Open Source: With Open Source security flaws are addressed and fixed more quickly than proprietary OS's like Sun and MS.

Tools needed to administrate Linux on Windows

PuTTY - Telnet and SSH client.
VNC - remote display system which allows you to view a computing 'desktop' environment.

Linux Basics - System Directory's

* /bin - Used to store user commands. The directory /usr/bin also stores user commands.
* /sbin - Location of many system commands, such as shutdown. The directory /usr/bin also contains many system commands.
* /root - The home directory of the superuser.

* /mnt - This directory typically contains the mount points for filesystems mounted after the system is booted.
* /boot - Contains the kernel and other files used during system startup.
* /lost+found - Used by fsck to place orphaned files (files without names).
* /lib - Contains many library files used by programs in /bin and /sbin. The directory /usr/bin contains more library files.
* /dev - Stores device files.
* /etc - Contains many configuration files and directories.

* /var - For "variable" files, such as log files and the printer spool.
* /usr - Contains files and directories directly relating to users of the system.
* /proc - A virtual file system (not actually stored on the disk) that contains system information used by certain programs.
* /tmp - A "scratch pad" for users and programs. /tmp has global read/write access.
* /home - Typical location of user home directories.

Linux Basics - The Shell

What is BASH... wait... what is a shell?
* A Shell is a command prompt much like MS-DOS. ITs a way of controlling the Operating system without the need of a GUI.
* BASH or Bourne Again SHell is a newer modern shell that has taken the place of the more ancient shells around like SH, Cshell and KornShell.

Linux Basics - Very basic Command's
* man - if you ever want to no what a command does this do a man on it. Man stands for Manual. Try this "man man".
* cd - Change directory ex. cd /home/shane

* ls - Load screen...this is the same as a dir/w in dos. Do a man ls
* cp - The copy command. Copies file/s from one destination to another. ex. cp shane.txt /home/shane
* mv - Move the file from one destination to another. ex. mv /home/natas/shane.txt /home/shane
* pwd - You lost? Type this command to see where you are.
* who - Want to see who's on the same machine as you?
* whoami - Forget if you logged in as a user or as root...type this command to see who you are

Bash Tricks
**Autocompletion:You don't always have to type the whole command while in bash. Example try typing the following:
nc (Hit the tab key after type in nc) Now if you have ncftp installed it will autocomplete this for you. So instead of typing "ncftp" all you had to type was "nc" and the tab key!
*Note if there are multiple binaries that start with nc and you hit tab you will hear a beep...hit tab twice in a row and it will show you a list!

The root Account
The root account is a privileged user account used for administration functions.

*root can damage the system and should only be used if other actions cannot be taken by a priveledged user for specefic actions.
*Never leave a console open with the root account
*su Command: The su command is used by the system administrator to become another user temporarily. The su command is a better solution to invoke opposed to logging in as root. Doing this can minimize the risk of damaging a system. Once su is invoked, new shell is invoked with the user and group IDs of the specefic login name. If the - option is invoked the shell executes the login profiles to set up the enviroment as though the new user had logged in normally. The -c command is used to just invoke a command and will exit once ran.

Full Story

» Read more about: Story Type: Tutorial

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.