Feeds:
Posts
Comments

Archive for August, 2007

There 5 methods in using ‘cd’:

  1. cd /path/directory move to a ‘/path/directory’

  2. cd directory move to a ‘/directory’

  3. cd - go back

  4. cd .. go up 1 level

  5. cd back to /home directory

 

Now, let’s practice.
I’ll show you some examples. My position is at /home/taufanlubis.

method # 1
taufanlubis@zyrex:~$ cd /usr
taufanlubis@zyrex:/usr$ ls -l
total 180
drwxr-xr-x 2 root root 53248 2007-08-12 12:45 bin
drwxr-xr-x 3 root root 4096 2007-08-11 07:32 etc
drwxr-xr-x 2 root root 4096 2007-04-15 18:52 games
drwxr-xr-x 35 root root 4096 2007-08-05 05:29 include
drwxr-xr-x 175 root root 69632 2007-08-12 11:04 lib
drwxr-xr-x 3 root root 4096 2007-08-01 06:58 lib64
drwxr-xr-x 10 root root 4096 2007-04-15 18:48 local
drwxr-xr-x 2 root root 12288 2007-08-13 13:57 sbin
drwxr-xr-x 323 root root 12288 2007-08-12 12:45 share
drwxrwsr-x 11 root src 4096 2007-08-16 07:26 src
drwxr-xr-x 3 root root 4096 2007-04-15 18:50 X11R6

taufanlubis@zyrex:/usr$


method # 2
(go to directory inside /usr, you don’t have to use /games)
taufanlubis@zyrex:/usr$ cd games
taufanlubis@zyrex:/usr/games$


method # 5
(go to home directory)
taufanlubis@zyrex:/usr/games$ cd
taufanlubis@zyrex:~$


method # 3
(go to the previous directory)
taufanlubis@zyrex:~$ cd -
/usr/games

taufanlubis@zyrex:/usr/games$


method # 4
(go up 1 level)
taufanlubis@zyrex:/usr/games$ cd ..
taufanlubis@zyrex:/usr$

 

 

Read Full Post »

Go to the directory that you want to pack.

taufanlubis@zyrex:~$ cd /media/hda5/Wallpapper/

taufanlubis@zyrex:/media/hda5/Wallpapper$ ls
Linux Pinguin Wallpers10.jpg Linux Pinguin Wallpers5.jpg
Linux Pinguin Wallpers11.jpg Linux Pinguin Wallpers6.jpg
Linux Pinguin Wallpers1.jpg Linux Pinguin Wallpers7.jpg
Linux Pinguin Wallpers2.jpg Linux Pinguin Wallpers8.jpg
Linux Pinguin Wallpers3.jpg Linux Pinguin Wallpers9.jpg
Linux Pinguin Wallpers4.jpg Thumbs.db

taufanlubis@zyrex:/media/hda5/Wallpapper$ tar cvf wallpaper.tar *
Linux Pinguin Wallpers10.jpg
Linux Pinguin Wallpers11.jpg
Linux Pinguin Wallpers1.jpg
Linux Pinguin Wallpers2.jpg
Linux Pinguin Wallpers3.jpg
Linux Pinguin Wallpers4.jpg
Linux Pinguin Wallpers5.jpg
Linux Pinguin Wallpers6.jpg
Linux Pinguin Wallpers7.jpg
Linux Pinguin Wallpers8.jpg
Linux Pinguin Wallpers9.jpg
Thumbs.db

taufanlubis@zyrex:/media/hda5/Wallpapper$ ls
Linux Pinguin Wallpers10.jpg Linux Pinguin Wallpers6.jpg
Linux Pinguin Wallpers11.jpg Linux Pinguin Wallpers7.jpg
Linux Pinguin Wallpers1.jpg Linux Pinguin Wallpers8.jpg
Linux Pinguin Wallpers2.jpg Linux Pinguin Wallpers9.jpg
Linux Pinguin Wallpers3.jpg Thumbs.db
Linux Pinguin Wallpers4.jpg wallpaper.tar
Linux Pinguin Wallpers5.jpg

 

How to display the content of the package?

taufanlubis@zyrex:/media/hda5/Wallpapper$ tar tf wallpaper.tar
Linux Pinguin Wallpers10.jpg
Linux Pinguin Wallpers11.jpg
Linux Pinguin Wallpers1.jpg
Linux Pinguin Wallpers2.jpg
Linux Pinguin Wallpers3.jpg
Linux Pinguin Wallpers4.jpg
Linux Pinguin Wallpers5.jpg
Linux Pinguin Wallpers6.jpg
Linux Pinguin Wallpers7.jpg
Linux Pinguin Wallpers8.jpg
Linux Pinguin Wallpers9.jpg
Thumbs.db

 

How to extract the package?

taufanlubis@zyrex:/media/hda5/Wallpapper/test$ sudo tar xvf wallpaper.tar
Linux Pinguin Wallpers10.jpg
Linux Pinguin Wallpers11.jpg
Linux Pinguin Wallpers1.jpg
Linux Pinguin Wallpers2.jpg
Linux Pinguin Wallpers3.jpg
Linux Pinguin Wallpers4.jpg
Linux Pinguin Wallpers5.jpg
Linux Pinguin Wallpers6.jpg
Linux Pinguin Wallpers7.jpg
Linux Pinguin Wallpers8.jpg
Linux Pinguin Wallpers9.jpg
Thumbs.db

 

Command options:

create a package: cvf
c–create create a new archive
v–verbose verbosely list files processed
f–file=ARCHIVE use archive file or device ARCHIVE

display the content: tf
t–list list the contents of an archive
f–file=ARCHIVE use archive file or device ARCHIVE

extract the package: xvf
x–extract, –get extract files from an archive
v–verbose verbosely list files processed
f–file=ARCHIVE use archive file or device ARCHIVE

Read Full Post »

How to use chmod?

It’s used to change the file access permissions

There are two types of chmod:

  • system letter coding (symbolic)

  • system numeric coding (octal number)

 

Every files and directories in linux have 3 access user.

The user (u), group (g) and owner (o).

When you type $ls -l at the console, you will some informations.

 

drw-r–r– 3 taufanlubis taufanlubis 4096 2007-07-31 16:07 download
d = directory (mean that ‘download’ is directory not file).
3 first characters are for user (u) -> rw- = read (r), write(w) and not executable (x)
3 second characters are for group (g) -> r-x = can be read (r), can not be written (-) and not executable (x)
3 third characters are owner (o) -> r-x = can be read (r), can not be written (-) and not executable (x)

-rwx-w-r– 1 taufanlubis taufanlubis 1020 2007-08-01 10:00 filecoba
1 first character -> – = file (not directory)
3 first characters are for user (u) -> rwx = read (r), write able(w) and executable (x)
3 second characters are for group (g) -> -w- = can’t be read (-), write able (w) and not executable (-)
3 third characters are owner (o) -> r– = can be read (r), can not be written (-) and not executable (-)

lrwxrwxrwx 1 root root 19 2007-07-31 11:15 S20powernowd -> ../init.d/powernowd
1 first character -> l = link
3 first characters are for user (u) -> rwx = read (r), write able(w) and executable (x)
3 second characters are for group (g) -> rwx = read (r), write able(w) and executable (x)
3 third characters are owner (o) -> rwx = read (r), write able(w) and executable (x)

 

How to change the permission with letter coding?

$sudo chmod ug+rx coba -> set user and group to be ‘read able’ (r) and executable (x)

$sudo chmod ug-rx coba -> set user and group to be ‘not read able’ (-) and not executable (-)

 

How to change the permission with system numeric coding?

4 = read
2 = write
1 = executable

$sudo chmod 721 coba

-> 7 (user) / 0 (group) / 0 (owner)

-> 7 = 4+2+1 (read+write+executable) for user

-> 2 = 0+2+0 (not read+write+not executable) for group

-> 1 = 0+0+1 (not read+not write+executable) for owner

 

$sudo chmod 644 coba

-> 6 (user) / 4 (group) / 4 (owner)

-> 6 = 4+2+0 (read+write+not executable) for user

-> 4 = 4+0+0 (read+not write+not executable) for group

-> 4 = 4+0+0 (read+not write+not executable) for owner

 

 

 

 

Read Full Post »

How to install Xampp?

Many people know from their own experience that it’s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

Just download it from: http://www.apachefriends.org/en/xampp.html

Install xampp using command line:

$sudo tar xvzf xampp-linux-1.6.2.tar.gz -C /opt
$cd /opt/lampp
$sudo ./lampp start

or you can choose which service that you only want to run.

Usage: ./lampp <action>

start Start XAMPP (Apache, MySQL and eventually others)

startapache Start only Apache
startssl Start only SSL support
startmysql Start only MySQL
startftp Start only ProFTPD

stop Stop XAMPP (Apache, MySQL and eventually others)
stopapache Stop only Apache
stopssl Stop only SSL support
stopmysql Stop only MySQL
stopftp Stop only ProFTPD

 

 

reload Reload XAMPP (Apache, MySQL and eventually others)
reloadapache Reload only Apache
reloadmysql Reload only MySQL
reloadftp Reload only ProFTPD
restart Stop and start XAMPP

 

security Check XAMPP’s security
php5 Activate PHP5
php4 Activate PHP4
phpstatus Which version of PHP is active?

 

backup Make backup file of your XAMPP config, log and data files
panel Starts graphical XAMPP control panel

 

To test it, just open your web browser (Firefox) then type: http://localhost

If the installation process is correct then you will see the xampp main page.

Read Full Post »

1. You have to download package dpkg-dev_1.13.24ubuntu6_all.deb (or newer version)
Just type $sudo apt-get install dpkg-dev (in the console screen)

2. Make a folder in /home/your_username, for example repo_ubuntu

3. Copy all files from /var/cache/apt/archives to /home/your_username/repo_ubuntu

$cd /var/cache/apt/archives
$cp -rf * /home/your_username/repo_ubuntu

4. Make index package with dpkg-scanpackages
$cd /home/your_username
$sudo dpkg-scanpackages repo_ubuntu /dev/null | gzip -9c > repo_ubuntu/Packages.gz

(if you are succeed, then the making process is done).

 

How to use this local Repository?

1. Edit your sources.list at /etc/apt/sources.list, but always make a copy first in case you may make a mistake.
$sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
$sudo gedit /etc/apt/sources.list

2. Add your repository (/etc/apt/sources.list) with the below line
deb file:/home/your_username repo_ubuntu/

3. To make new index for your repository, type
$sudo apt-get update

Read Full Post »

How to install Skype in Ubuntu?

Skype need 3 library to run itself. These files are:

- libqt4-core (1.2MB)

- libqt4-gui (4.9MB)

- qt4-qtconfig

 

Just install it with:

$sudo apt-get install libqt4-core

$sudo apt-get install libqt4-gui

$sudo apt-get install qt4-qtconfig

 

Then download the file from www.skype.com

There are 7 files for 7 distros:

  • Feisty Fawn

  • Debian Etch

  • Mepis

  • Xandros

  • Fedora Core 7 / Fedora 7

  • OpenSUSE 10+

  • Mandriva

 

Click Feisty Fawn, to get the file package for Ubuntu then install the package using command:

$sudo dpkg -i skype-1.4.0.74.deb.bin (depend on skype version)

Then fill the user_id and password or sign up for a new account if you don’t have it.

 

 

Read Full Post »

Linux Terminal

What I like when I work with linux is the console. Instead using mouse to run Evolution to check my email, I just use:

Alt-F2

type “evolution

then press “enter” button.

 

You can do to another program, such as:

type “xmms” for music

type “xterm2” for terminal

type “konsole” for terminal (Not automatically installed in Ubuntu Feisty, you have to download it with command: $sudo apt-get install konsole).

type “konqueror” for File Manager (Not automatically installed also in Ubuntu Feisty, you have to download it).

etc….etc….

to close, just type “exit” and press “enter” in the terminal.

 

Read Full Post »

« Newer Posts - Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 75 other followers