Pages

Saturday, June 5, 2010

How to install applications in Ubuntu?

There are multiple ways to install applications in Linux:
1. From the command line 
Run: sudo apt-get install app_name
If app_name files are ported for the Linux distribution (Ubuntu, Fedora, etc) and are available then it will download and install all the files automatically.

2. Trough a graphical package management tool 
If you are not comfortable using the command line, you can use many graphical front-end tools for Apt.   
Ubuntu
        Add new applications
        Applications menu → Ubuntu Software Center → Get Software
        Remove installed applications
        Applications menu → Ubuntu Software Center → Installed Software
        → Select application → Remove
RedHat  
        Start → System Settings → Add/Remove Applications

3. Autopackage 
Autopackage has been developed keeping in mind the functionality of MS Windows installers, Autopackage is software that lets you create binary packages of software for Linux that will install automatically, interactively on any Linux distribution through multiple front-end. When the Autopackage installer file is run to install a certain software, it checks the system for the installed component the software in question needs, installs it if it finds in its installer files or downloads and installs it from internet (similar as Debian’s Apt) if it does not find it locally. This concept is in infant stage, and you can find a few applications Autopackaged already.
Source: http://raviratlami1.blogspot.com

4. From a source file
The best way to install an application in Linux is to compile its source. Linux sources are available as compressed tar gzipped or bzipped files. To install application through its source, copy or download the source in a directory you think appropriate and then decompress them. For example, if you have source file in tar gzipped format, say, source file of package xyz, xyz-3.29.tar.gz, then the command to unpack it will be:
tar -zxvf xyz-3.29.tar.gz
The command will create a directory containing all the source files called xyz-3.29 in current directory. Now change to this directory and see the directory listing. You will find many files and directories there. You will also find a script file called configure. Now give the following command:
./configure
If you had installed necessary development environment including compilers, make, automake tools in your computer, then it will start compiling necessary information and creating necessary make files. If this command finishes without errors then give next command:
make
This command should also finish without any error massage. Finally, change to root user mode by giving su command if you are not already in super user mode, and then give following command to install executable files at appropriate directories:
make install
Don't forget to give following command to remove unnecessary files created by above commands:
make clean
If you think every thing has gone right, then you can run the application by giving its name as command (in general), here, xyz. In some cases you may find program menu entries automatically added, else you have to add them manually.
Source: http://raviratlami1.blogspot.com

You need administrative access to Add/Remove Programs.

Linux Usefull Applications

Here there are some of the best Linux applications:

 1. Work with files (File Managers)
- NC style: Midnight Commander (mc)
- Windows Commander style: Krusader
- Windows style: Konqueror
- Text editors: Kedit, Gedit
2. Multimedia
- Music/mp3/ogg players: Rhythmbox Music Player, Mplayer, Winamp
- Video / mpeg4 players: Mplayer, Kplayer
- Audio editors: Ardour, Audacity
- Programs for CD/DVD burning with GUI: K3b Support: k3b.org
- Graphic files viewer: Xnview download from: xnview.com, GQView
- Simple graphic editors:  OpenOffice.org Drawing,  Xpaint
- Drawing program for children: Tuxpaint
- Powerful graphic editors in PhotoShop style: Gimp ImageMagick
- Program for work with vector graphics: Inkscape
- 3D-graphics: Maya, Blender
3. Office/business
- Office suite: OpenOffice download from: openoffice.org
- Graphing / charting data: Kivio, Dia
4. Programming and development
- IDE: CodeForge, Eclipse
- C++ IDE: gcc
- Assembler: NASM
- Disassembler: Code source is open, Idasm
- Java IDE: NetBeans, Eclipse
- FTP-server: pure-ftpd, vsftpd, ftp
- Language for Web-development: PHP, Perl, ASP (module for Apache)
- Database engine: MySQL, PostgresSQL, Freebird
5. Scientific and special programs
- Math system in Matlab style: Matlab
- Math system in Mathematica style: Maxima
- Equation/math editor: OpenOffice Math

The applications are free and in order to install them you need to run the following command in the terminal:
sudo apt-get install application name








Friday, June 4, 2010

Tux



        Linus Torvalds personal mascot is a penguin nicknamed Tux, which has been widely adopted by the Linux community as the mascot of the Linux kernel. The first person to call the penguin Tux was James Hughes, who said that it stood for "(T)orvalds (U)ni(X)".

Source: wikipedia.org

Who is Linus Torvalds?

        Linus Torvalds, the creator of the Linux kernel, was born in Helsinki, Finland, on December 28, 1969. When Linus was ten years old, his grandfather, a statistics professor at University of Helsinki, purchased a Commodore VIC-20 computer. Linus served as an assistant to his grandfather by entering data into his grandfather's "programmable calculator" and, just for fun, taught himself some simple BASIC programs by reading the instruction books that came with the computer. By the time he registered as a computer science student at the University of Helsinki, Linus Torvalds was an accomplished programmer.
        In 1991, after taking a course in Unix and C, Torvalds bought his own PC. He was unhappy with the operating system that came with the computer (MS-DOS) and decided to write his own. Torvalds became interested in Minix, a small Unix-like operating system developed for educational purposes by Andrew S. Tanenbaum, a Dutch professor who wanted to teach his students the inner workings of a real operating system. Minix was designed to run on Intel 8086 microprocessors and had source code that was readily available for study. Torvalds decided to develop an operating system that exceeded the Minix standards. He called it Linux, a contraction for Linus' Minix.
        Linus Torvalds did not copyright his computer code. Instead, he published his code on the Internet and asked members of the comp.os.minix newsgroup to help him build his operating system. On August 25, 1991, Linus Torvalds posted this famous message:
Hello everybody out there using minix -
I'm doing a (free) operating system
(just a hobby, won't be big and professional
like gnu) for 386(486) AT clones.
        Linus Torvalds credits much of the success of his operating system to the Internet and to Richard Stallman's GNU project. Torvalds and his co-developers made use of the system components developed by members of the Free Software Foundation for the GNU project. The open-source philosophy behind the development of Linux, combined with the success of the operating system, has made Linus Torvalds into what can arguably be called a "cult figure." Unlike Windows and other proprietary operating systems, Linux remains publicly open and extendible by contributers. Anyone can use it without charge as long as any improvements they make are not copyrighted and remain freely available. At present, it's estimated that only 2% of Linux code today was written by Linus Torvalds himself, although he still "owns" the Linux kernel (the central part of the operating system) and remains the ultimate judge of what new code and innovations are incorporated into it.
        After spending 10 years as a student and researcher at the University of Helsinki coordinating the development of the Linux kernel, Linus Torvalds accepted a job with Transmeta, a Silicon Valley start-up company known for its recruitment of high profile talent and its Crusoe chip. He is married and has two daughters.

Source: wikipedia.org, searchenterpriselinux.techtarget.com

What is Linux?

        LINUX is a Unix-like operating system that was designed to provide personal computer users a free or very low-cost operating system comparable to traditional and usually more expensive Unix systems. Linux has a reputation as a very efficient and fast-performing system.
        LINUX's kernel (the central part of the operating system) was developed by Linus Torvalds (1991) at the University of Helsinki in Finland. To complete the operating system, Torvalds and other team members made use of system components developed by members of the Free Software Foundation for the GNU Project.
        Typically all the underlying source code can be used, freely modified, and redistributed, both commercially and non-commercially, by anyone under licenses such as the GNU General Public License.

    Why Linux?
     → Free
     → Forget about viruses
     → Stable OS
     → Flexibility
     → Multitasking
     → Command line
     → Full access
     → Remote tasking ("real networking")
     → Multiuser
     → Access to shell, programming languages, databases, open-source projects
     → Better performance
     → More up-to-date
     → Open-source, publicly open and extendible by contributors

    LINUX distributions: Ubuntu, Fedora, Mandriva, SuSE, etc.

Sources: wikipedia.org, searchenterpriselinux.techtarget.com

Setup the Proxy Server for apt-get in Linux

        Open a new root terminal and run the next command from $HOME folder:

gedit .bashrc

        This will open the /etc/bash.bashrc file for editing. Add the following lines to the end of this file:
export http_proxy=http://user:password@my.proxy.server:port/
export ftp_proxy=http://user:password@my.proxy.server:port/
        If you have no authentication on the proxy server, include only the server and port:
export http_proxy=http://cache.proxy.server:port/
export ftp_proxy=
http://cache.proxy.server:port/
 
        Finally,  run the source command:

source .bashrc 

        Now you should be able to run apt-get from the command line.

Thursday, June 3, 2010

Usefull Linux Shortcuts

1.   CTRL+ALT+T = Run a terminal.
2.   CTRL+L = Clear the terminal.
3.   CTRL+C = Stops the program (end task).
4.   CTRL+Z = Send the current process to background. It is useful if  you you need the terminal for awhile but don’t want to exit the running program completely. To get the process back type the command fg.
5.   ALT+[F9 or F10] = Minimize/Maximize a window.
6.   TAB = Start typing the command, filename, or directory and hit tab. Bash will automatically complete what you are typing.
7.   CTRL+ALT+[LEFT, RIGHT, UP, DOWN] ARROW = go to [LEFT, RIGHT, UP, DOWN] desktop.
8.   CTRL+U = Erase the current line.
9.   Ctrl + [a or e] = Move the cursor to the beginning/end of the current line.
10. Ctrl + Alt + Backspace = Kill the X server if X crashes and you can’t exit it normally.

Comenzi utile Linux

man (command)= info (command)
w = display user list
pwd = print working directory
mkdir = create new folder
ls display files
xrandr = screen resolution
touch = create file
ps = see all processes
echo = display message on screen

NS2 allinone 2.34 install on Ubuntu 10.04

1. Download ns-allinone-2.34.tar.gz from isi.edu
2. tar -xzvf ns-allinone-2.34.tar.gz to unpack the saved archive
3. cd ns-allinone-2.34
4. sudo apt-get install build-essential autoconf automake libxmu-dev
5. sudo apt-get install g++-4.3
7. cd otcl-1.13
8. gedit Makefile.in → Replace CC= @CC@ with CC=gcc-4.3 → Save
9. cd .. → ns-allinone-2.34
10. ./install
11. gedit ~/.bashrc → Add the following lines to the end of the file and specify the folder wher ns-allinone-2.34 was unpacked as /your/path (eg. /home/dan):
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:
$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-
2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/your/path/ns-allinone-2.34/ns-2.34/
NAM=/your/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

12.   source ~/.bashrc
13. ns → % exit
14. cd ns-2.34
15. ./validate

Installation complete.