December 29, 2007

VI text editor :) part1

What is vi? Why does anyone use it? More importantly, why should I use it?

vi is default editor under Unix/Linux, and is therefore shipped with all recent version of Unix/Linux.
This means that whenever you run across a machine that is running a Unix of some sort, you will know that you have a powerful editor at your finger tips.

Why else?

vi is a powerful editor. Also, once you know vi, you can edit files really quickly, as it is extremely economical with the keystrokes.

Due to its different modes for inserting and issuing commands, it is much faster than most non-mode based editors.
It is also a very small editor. Also, it can do almost anything, as long as you know how to get it to do what you want

Wow! This sounds great! Is there any reason not to use vi?

Yes. There is a very good reason. It can be somewhat hard to learn, and until you do so.
it will be slow and painful. Once you learn it, it will be faster, but the process of learning it is slow.
I've been asked if vi was an easy editor to learn?

My general response to this question is:
"Yes, some of us think so. But most people think that we are crazy."


The 3 Modes of VI

The first thing most users learn about the VI editor is that it has 3 modes:

command, insert and excute.
1 - Command Mode
allows the entry of commands to manipulate text.( copy , delete ,past , cut ...etc )
These commands are usually one or two characters long, and can be entered with few keystrokes.

2 - Insert Mode
puts anything typed on the keyboard into the current file. (insert text ...etc )

3 - Excute Mode
Commands Used to (save , quite , search , load file ... etc )

================

VI starts out in command mode. There are several commands that put the VI editor into insert mode.

The most commonly used commands to get into insert mode are (a and i). These two commands are described below.

Once you are in insert mode, you get out of it by hitting the escape key.
If your terminal does not have an escape key, ^[ should work (control-[).

You can hit escape two times in a row and VI would definitely be in command mode.
Hitting escape while you are already in command mode doesn't take the editor out of command mode. It may beep to tell you that you are already in that mode.

to use excute mode
- from command mode typethe ":"befor the commands


=======================================================
How to Type Commands in Command Mode ?

The command mode commands are normally in this format:(Optional arguments are given in the brackets)

[count] command [where]

Most commands are one character long, including those which use control characters.
The commands described in this section are those which are used most commonly the VI editor.

The count is entered as a number beginning with any character from 1 to 9. For example, the x command deletes a character under the cursor. If you type 23x while in command mode, it will delete 23 characters.

Some commands use an optional where parameter, where you can specify how many lines or how much of the document the command affects, the where parameter can also be any command that moves the cursor.

December 10, 2007

Discover your Boot loader "Configure - Restore - Remove"

there are several ways to boot Linux But the most common method involve booting from hard drive.
To boot Linux you'll need a boot loader (Grub - Lilo) we'll talk about Grub

grub boot loader read its configuration from file located in

/boot/grub/grub.conf <----- main file
/boot/grub/menu.lst <----- symbolic link to the first file
/etc/grub.conf <----- symbolic link to the first file

NOTE : in other distributions like SUSE it use the menu.lst as main file and grub.conf is a simpolic link to it.

the file content as fellow :

default=0
timeout=10
splashimage=(hd0,0)/grub/bootsplash.xpm.gz
hiddenmenu

title Fedora (2.6.22.9-91.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.22.9-91.fc7 ro root=/dev/sda3
initrd /initrd- 2.6.22.9-91.fc7.img

title Windows
chainloader (hd0,1)+1
======================
default=0
Choose the Default system to auto boot 0 = first in menu, 1 = second

timeout=10
time in seconds to automate boot the default system

splashimage=(hd0,0)/grub/bootsplash.xpm.gz
back ground image of the grub

hiddenmenu
hide the systems menu

title Fedora (2.6.22.9-91.fc7)
title of your first system

root (hd0,0)
used to define where is your /boot

kernel /vmlinuz-2.6.22.9-91.fc7 ro root=/dev/sda3 quit
kernel define kernel file to boot it
root define the partition that your Linux system located
quite hide many messages from the users


title Windows
title of your Second system

chainloader (hd0,1)+1
partition which your Windows system

=============================================
Restore the Grub Menu after a Re-Install Windows :
=============================================

1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or your rescue CD.

2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary.

3. Type "grub" which makes a GRUB prompt appear.

4. Type "root (hd0,0)". hd0 =my hdd , 0 is the partition which my /boot/ is exist

5. Normaly Type "setup (hd0)".if you want to write GRUB to the MBR.

If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".

7. Type "quit".
8. Restart the system. Remove the bootable CD.

============ Alternate method ===================
Boot your system using your Fedora Core Rescue disc .
When you get to the command prompt type:

  • chroot /mnt/sysimage
  • grub-install /dev/hda

Now just hit Ctrl+D twice and your system should reboot. Once your system reboots you should see the GRUB menu.

That's it!!! You're done.

======================================================
Remove the Grub to use only your windows system " Enjoy the viruses"
======================================================

in windows XP
1. Boot your windows CD
2. Choose repair
3. Choose your system
4. login as admin
5. Type "fixmbr"
5. reboot your system &amp; enjoy the unstabiity

in windows 9x/Me
1. type "fdisk / mbr "

============ resources ==============
http://www.sorgonet.com/linux/grubrestore/
http://fedoranews.org/contributors/bob_kashani/grub/
http://ubuntuforums.org/archive/index.php/t-24113.html
http://www.whoopis.com/howtos/howto_restore_mbr_grub.php

December 05, 2007

Configure Your Network

To configure your network you need to be root by using the su command
also you need some information about your network like

your IP, subnet mask , DNS IP , Gateway IP

NOTE : our common networks use its routers as DNS & GateWay in the same time
but some ISP provide it's own DNS.

in this article we will use the fellowing data as example :

IP : 192.168.1.200
SUBMASK : 255.255.255.0
GATEWAY : 192.168.1.1

DNS : 192.168.1.1 <---- your ISP may provide you with other IP


===============================
We will need to edit 2 files :

1. network card configration file : /etc/sysconfig/network-scripts/ifcfg-eth0
2. DNS configration file : /etc/resolv.conf

===============================
Frist : Edit Network configartion file
===============================
using the command :

vi /etc/sysconfig/network-scripts/ifcfg-eth0

enter the fellowing lines :
IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

the change the fellowing line to :
BOOTPROTO=none <---- "if not exist create it" so your file maybe like the image


then save & exit
===============================
Second : Edit DNS configration file
===============================
vi /etc/resolv.conf

enter the fellowing line

nameserver 192.168.1.1

NOTE : every line have one DNS IP and you may add mor than one like the fellowing image i add 3 DNS servers



then save & exit.

to changes take effect you must restart your network deamon

/etc/init.d/network restart


Configration is done use your browser& Visit out group & have fun :)

Fedora Overview



If you want information about this system i advice to visit this links it'll answer most of your questions in a Q/A way "simple but efective "

  1. Fedora Overview
  2. Fedora Release Notes
  3. Fedora Frequently Asked Questions
  4. The Unofficial Fedora FAQ <-------- Good One

from
fedora user :)

Share folders to windows users " SAMBA server"

STEP 1: Enable Network Connectivity to the SAMBA Server

Using the Fedora Network Configuration tool you will need to ensure that the ethernet card is enabled and properly functioning. Get quick access to the tool through this command: system-config-network

Once in the Network Configuration tool, you should ensure that your ethernet device is enabled. If it is not, select the eth device and then click on the Edit button. This will allow you to input the vital network adapter settings including: statically set IP address, subnet mask, and gateway. You should also select the top checkbox labeled Activate device when computer starts.




Close and save any changes you've made. The main goal is to ensure you have an ACTIVE and functioning network card on the SAMBA server.

Restart the network services or simply reboot your SAMBA server. Now try a ping to the server from another PC on the same subnet. At a command prompt, for example, type: ping 192.168.1.200

The ping should come back good validating your network connection. If you need more Linux system administration help read my Admin Commands List.


STEP 2: Enable SMB Services

the SMB daemon and other core services are usually NOT started by default. You will need to change this so that your SMB daemon is now started.

Using the GUI from the main menu, go to System Settings, then Server Settings, then choose Services. You can also get to this using the command: system-config-services



While you're looking over this long list of services, please DISABLE things you know for sure you do not need to run on this SAMBA server. For instance apmd, isdn, etc. But also ensure that key services such as SMB are selected and RUNNING. Select SMB and press the Start button. If it is supposedly already running you can press the Restart button to be sure it is indeed running correctly now.

Now press the Save button to make sure the configuration changes have been saved for future restarts.

Sometimes using the GUI just does not properly restart the SMB daemon. In such odd cases, I want to suggest you force a manual restart from the command line with this command:
/etc/rc.d/init.d/smb restart

STEP 3: Create Server Users & Directories

You will need to ensure that people also have a login to the SAMBA server to do their work. Logins should be provided on an as needed basis. Obviously, in most cases the users accessing the SAMBA server will be a subset of the total users on the Windows business network.

Create user logins with the Gnome User Manager tool in Fedora. You can find this from the main menu by choosing System Settings, then Users & Groups. The command for this is:
system-config-users

Notice this is the first step in creating SAMBA users, which comes later.

Add as many users as you need and then move on to the next part, which is creating directories (aka. folders) for use.

This is such an obvious step most people usually forget to think about it before hand. However, it is very helpful to think ahead what directories you will allow access to on the SAMBA Server for business use. In my case the people needing SAMBA server access will be updating webpages. Therefore, I do not need to add any other folders for file sharing or group interaction. Be sure you add any folders in a reasonable and ordered fashion.


STEP 4: Configure the SAMBA Server

It's time to configure your SAMBA server to allow others on the intranet to login and use the server from Windows or Linux PCs.

From the main Fedora menu, choose System Settings, then Server Settings, then Samba. You can also get to this tool by typing the command:
system-config-samba

You are about to make changes to the SAMBA Configuration file called smb.conf. This file is found under /etc/samba.

A. Begin by Making Changes to the Server Settings

Under the Preference menu item choose Server Settings...



Be sure to include the Windows workgroup name. In the example above the workgroup has been changed to net. Your situation may be different. In many cases naming the workgroup simply workgroup is fine, so long as your Windows PCs connect to this same name.

Under this same window, click on the Security tab. It comes by default with the appropriate settings for a basic SAMBA Server. The Authentication mode should be User. You would need to change this only if you plan to allow logins based on the Microsoft ADS.

NOTCE : If you make it Share it allow users view your shared folders without login <---- Insecure :) Press OK to finish making basic changes to the server. B. Select SAMBA Users Under the Preference menu item choose Samba Users In this window you must Add at least one user who will have access to the SAMBA Server. Notice that only user accounts you created in step 3 should be added to this listing.



Press the Add User button, then from the pull down select a user. Fill out the additional information needed for this SAMBA user. Press OK when finished.

C. Adding A Shared Folder

Under the SAMBA Server Configuration window, you must create at least one SAMBA share directory.

Press the Add button and then the Browse button. Now choose a folder you wish to make available to SAMBA users. Be careful, some folders have permissions settings that do not allow sharing. Now be sure to select the Read/Write option to allow people full access. Don't press OK yet!



You should see your shared folder appear under the listing as shown in the example above.

D. Adding Users

In the same window, select the second tab labeled Access. From here choose the first option labeled Only allow access to specific users and select the users you wish to give access to this specific SAMBA shared folder. Press OK when finished.

You can repeat steps C and D for each new shared folder.

Once completed, please choose File from the menu then choose Quit.

STEP 5: Restart the SAMBA Services

Now you need to restart all SAMBA services. You can use the process found in Step 3, except press the Restart button or use the word restart instead of the word start.

STEP 6: Access the SAMBA Server from Windows

You're now ready to fully utilize your new intranet SAMBA Server for work. On any Windows PC you can access the server by simply going to the main Start menu, choosing Run and typing in the hostname of your SAMBA server. For example: \\linuxserver

Please notice that in the Windows environment you use different slashes and you need to ensure this syntax.



If this does not work, perhaps if the server is not yet included in your DNS, try accessing the SAMBA Server through its IP address: \\192.168.1.200

Obviously you need to use an actual hostname or IP address and not my example.

If all works well you should instantly see a SERVER LOGIN window. Now login using a SAMBA created username.




You should then instantly see the shared folder as well as the individual user's personal folder that exist on the SAMBA Server.



Congratulations, you're done.

December 04, 2007

Linux swap space


When your computer needs to run programs that are bigger than your available physical memory, most modern operating systems use a technique called swapping, in which chunks of memory are temporarily stored on the hard disk while other data is moved into physical memory space. Here are some techniques that may help you better manage swapping on Linux systems and get the best performance from the Linux swapping subsystem.
Complete The Article

openSUSE 10.3 Installation

Linux installation has never been this simple. Even Linux novices can install openSUSE 10.3 in a few easy steps:

1. Language Selection
After you insert the first DVD of openSUSE 10.3 into your machine, the graphical installation tool YaST will launch. Select your preferred language from the list that appears.



2. Installation Mode
After you accept the end-user license agreement, YaST checks your hard disk. If you already have installed an older version of openSUSE, YaST asks you whether you want to update your system or make a new installation. If you have an older version of openSUSE installed, choosing "Update" will preserve your existing files. Choosing "New Installation" will erase your existing work.



To offer you the full set of software available "Add online respository" is selected by default. This will add our ftp tree to the installation sources and provides numerous additional software packages for literally any needs.

3. Desktop Selection
After setting or accepting the suggested time zone, you need to choose your preferred desktop environment, KDE or GNOME. Both have elegant, modern GUI interfaces and use state-of-the-art default applications for general-productivity tasks. If you want to try out both interfaces, you can. For now, choose one and later, in the installed system, you can install the other one. Then, you can easily switch between GNOME and KDE each time you log into the system. It's easy.



4. Installation Settings
YaST automatically checks your system and presents you with an installation proposal; to see more details of the installation settings that YaST has recommended, choose the expert mode. If you wish, you can easily install additional applications or change the settings. When you're satisfied with your choices, simply click Accept.



5. Password for System Administrator "root"
Linux protects your system by leaving many configuration options accessible only via a special Administrator ID and password. You will use your computer as a standard user, but to install or modify programs or important settings, you will have to log in as the "Root User." When you are operating as a standard user, you are better protected from harmful programs.



6. Network Configuration
The next step is the configuration of the Internet connection. Network cards, modems, ISDN cards and DSL devices are automatically detected. An extensive list of preconfigured ISPs facilitates the configuration of your Internet provider.



7. Online update configuration
During the installation, we recommend that you update your system with the online update service. This assures that all available updates and patches are conduct on your computer and your system is up to date.



8. User Authentification Method
Just before installation completes, openSUSE offers you the choice between a standalone system and a network system. Newcomers can simply confirm the default setting "Standalone System" by pressing the Next button, while experienced users can select their preferred user login methods for network use. On standalone systems you will be prompted to create a user ID.





9. Release Notes
Just before the installation finishes, the release notes are displayed. This is important information about openSUSE that became known shortly before the development process was completed and could not be included in the documentation.



10. Hardware Configuration
openSUSE will configure now the remaining system hardware. Usually, all components—including the graphics card, TV card, sound card, printer, scanner and monitor—are automatically detected and merely need to be confirmed. Of course, experienced users can use YaST for fine tuning.



11. openSUSE greeter
Finally the openSUSE greeter provides more information about the openSUSE project, the openSUSE Build Service and offers a direct link to community support possibilities. The susegreeter has an icon on the desktop—so you can easily look at this useful information again at a later stage.




========================= resources ========================

http://www.novell.com/products/opensuse/installation.html

netBeans 6.0 Released




NetBeans - The Only IDE You Need

The much awaited netBeans 6.0 has been released and can be downloaded from
http://download.netbeans.org/netbeans/6.0/final/
Aand U can read about the new feature here

December 02, 2007

Ubuntu 8.04 Alpha 1 Released

Hardy Heron was announced for the first time on August, 29 2007 and it will be available on April 24th 2008 as an LTS (Long Term Support) release. The release schedule for Hardy Heron has been made public more than a month ago.

Ubuntu 8.04 Roadmap :

  • 29 November 2007 - Alpha 1 release
  • 20 December 2007 - Alpha 2 release
  • 10 January 2008 - Alpha 3 release
  • 31 January 2008 - Alpha 4 release
  • 21 February 2008 - Alpha 5 release
  • 6 March 2008 - Alpha 6 release
  • 27 March 2008 - Beta release
  • 17 April 2008 - Release Candidate
  • 24 April 2008 - Final release of Ubuntu 8.04 LTS

Download : https://wiki.ubuntu.com/HardyHeron/Alpha1

HAPPY UBUNTUING

Firefox 3 - New Feature


Latest nightly build of Firefox 3 sports the much improved location bar autocomplete, that unlike Firefox 2 which only looked for web addresses in my history, this one looks on visited and bookmarked page titles and tags along with web addresses.

November 30, 2007

لينكس الشامل : ابدأ لينكس من هنا

قبل البدء:-
السلام عليكم و رحمه الله و بركاته و تحيه طيبه للجميع
أبدأ اليوم بإذن الله اول سلسله نقاش علي المدونه و سوفأتحدث فيها عن كتاب أعتبره من أفضل الكتب العربيه في مجال التكنولوجيا و خاصه لينكس, لمؤلفه أ.مؤيد صالح السعدي

و قبل البدء أري ان ما يلي يجب ذكره.

ما يجب ذكره قبل البدء:-
في هذه السلسله سوف استعرض الكتاب و محتواه دون ابداء أي رأي شخصي فيه ,
(أي ان الرأي الوارد ذكره هنا هو رأي المؤلف)
و في نهايه السلسله سوف نستعرض رأيي السخصي بالاضافه لبعض الاراء التي كتعليقات علي الحلقات.

الشامل ,تجربه عربيه جديدة:-
يعد كتاب الشامل تجميع لعده مقالات لمؤلف الكتاب و محتواه أو كما يقول المؤلف
"بعد أن كتبت عده مقالات حول لينكس وجدت أنها قد تشكل بدايه لكتاب جيد."
و هكذا بدأ كتاب لينكس الشامل
الكتاب متاح مجاناً علي موقع
www.cltp.net
و هو خاضع لرخصة الجي بي ال
أي أنك لك حق التوزيع و النشر دون الاتجار فيه أو الاقتباس منه دون تضمين اسم المؤلفو يمكن مراسله المؤلف علي بريده الالكتروني هنا و ما سبق ليس سوي احقاقا للمؤلف

المزيد عن الشامل:-
يعد الكتاب من أفضل الكتب العربيه (ان لم يكن الوحيد) و الذي يناقش نظام التشغيل مفتوح المصدر و من مميزاته ما يلي:
1- الكتاب باللغة العربيه (قد يعتبره البعض عيب ,اقرأوا و سوفيتبين لكم ذلك!)
2- كتاب مفتوح المصدر اي لا يباع و حقوق نشره مفتوحه.
3- لا يفترض منك أي خبره مسبقة.
4- يغطي كافه مراحل العمل علي النظام.
5- غني التمثله و الصور و الجداول.

الكتاب مكون من 8 أبواب بلاضافه الي جزء الملحقات, و كل باب ينتهي بالتمارين علي هذا الباب لتأكيد الافاده
و سوف نلحق هذه الحلقات بحلقات التعليق علي الكتاب نستعرض فيهم كل باب

انتظروني الحلقه الحلقة الجايه
"المقدمه و الباب الاول"
السلام عليكم

November 26, 2007

First Post, Welcome to the New BLog

Welcome Every body,
this Article is The "Hello World" Article of Our new Blog,
I'm Ahmed Gaber , a member of Ismailia LUG , Egypt and the creator of the Blog Here!

I look for establish this Blog to be a way of Discussing every new (Let me Say SPOT) event in Linux ,

I hope the Idea is new and let's try to make it as small Community ( not the Complete Idea of the Community)

I hope also you add us on Your Feeds List, ( and if You don't have a feed list , Let's be the first in yours)

Posts will begin Shortly and we look for help You

SaLaM!