Slideshow


Status YM

This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Tampilkan postingan dengan label linux. Tampilkan semua postingan
Tampilkan postingan dengan label linux. Tampilkan semua postingan

Rabu, 11 Maret 2009

Konfigurasi BIND pada Redhat 9

This chapter assumes that you have a basic understanding of BIND and DNS; it does not attempt to explain the concepts of BIND and DNS. This chapter does explain how to use the Bind Configuration Tool (redhat-config-bind) to configure basic BIND server zones. The Bind Configuration Tool createsthe /etc/named.conf configuration file and the zone configuration files in the /var/named directory each time you apply your changes.
Important Important


Do not edit the /etc/named.conf configuration file. Bind Configuration Tool generates this file after you apply your changes. If you want to configure settings that are not configurable using Bind Configuration Tool, add them to /etc/named.custom.

The Bind Configuration Tool requires the X Window System and root access. To start the Bind Configuration Tool, go to the Main Menu Button (on the Panel) => System Settings => Server Settings => Domain Name Service or type the command redhat-config-bind at a shell prompt (for example, in an XTerm or GNOME-terminal).

Figure 21-1. Bind Configuration Tool

The Bind Configuration Tool configures the default zone directory to be /var/named. All zone files specified are relative to this directory. The Bind Configuration Tool also includes basic syntax checking when values are entered. For example, if a valid entry is an IP address, you are only allowed to type numbers and periods (.) into the text area.

The Bind Configuration Tool allows you to add a forward master zone, a reverse master zone, and a slave zone. After adding the zones, you can edit or delete them from the main window as shown in Figure 21-1.

After adding, editing, or deleting a zone, you must choose click the Save button or select File => Save to write the /etc/named.conf configuration file and all the individual zone files in the /var/named directory. Saving changes also causes the named service to reload the configuration files. Selecting File => Quit saves the changes before quitting the application.
21.1. Adding a Forward Master Zone

To add a forward master zone (also known as a primary master), click the New button, select Forward Master Zone, and enter the domain name for the master zone in the Domain name text area.

A new window as shown in Figure 21-2 will appear with the following options:

*

Name — Domain name that was just entered in the previous window.
*

File Name — File name of the DNS database file, relative to /var/named. It is preset to the domain name with .zone appended to it.
*

Contact — Email address of the main contact for the master zone.
*

Primary Nameserver (SOA) — State of authority (SOA) record. This specifies the nameserver that is the best resource of information for this domain.
*

Serial Number — The serial number of the DNS database file. This number must be incremented each time the file is changed, so that the slave nameservers for the zone will retrieve the latest data. The Bind Configuration Tool increments this number each time the configuration changes. It can also be incremented manually by clicking the Set button next to the Serial Number value.
*

Time Settings — The Refresh, Retry, Expire, and Minimum TTL (Time to Live) values that are stored in the DNS database file. All values are in seconds.
*

Records — Add, edit, and delete record resources of type Host, Alias, and Name server.

Figure 21-2. Adding a Forward Master Zone

A Primary Nameserver (SOA) must be specified, and at least one nameserver record must be specified by clicking the Add button in the Records section.

After configuring the Forward Master Zone, click OK to return to the main window as shown in Figure 21-1. From the pulldown menu, click Save to write the /etc/named.conf configuration file, write all the individual zone files in the /var/named directory, and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone "forward.example.com" {
type master;
file "forward.example.com.zone";
};

It also creates the file /var/named/forward.example.com.zone with the following information:

$TTL 86400
@ IN SOA ns.example.com. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


IN NS 192.168.1.1.

sumber http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-bindconf.html

Instalasi DNS Server dengan BIND di Redhat 9

BIND Configuration

This chapter assumes that you have a basic understanding of BIND and DNS; it does not attempt to explain the concepts of BIND and DNS. This chapter does explain how to use the Bind Configuration Tool (redhat-config-bind) to configure basic BIND server zones. The Bind Configuration Tool creates the /etc/named.conf configuration file and the zone configuration files in the /var/named directory each time you apply your changes.
Important Important


Do not edit the /etc/named.conf configuration file. Bind Configuration Tool generates this file after you apply your changes. If you want to configure settings that are not configurable using Bind Configuration Tool, add them to /etc/named.custom.

The Bind Configuration Tool requires the X Window System and root access. To start the Bind Configuration Tool, go to the Main Menu Button (on the Panel) => System Settings => Server Settings => Domain Name Service or type the command redhat-config-bind at a shell prompt (for example, in an XTerm or GNOME-terminal).

Figure 21-1. Bind Configuration Tool

The Bind Configuration Tool configures the default zone directory to be /var/named. All zone files specified are relative to this directory. The Bind Configuration Tool also includes basic syntax checking when values are entered. For example, if a valid entry is an IP address, you are only allowed to type numbers and periods (.) into the text area.

The Bind Configuration Tool allows you to add a forward master zone, a reverse master zone, and a slave zone. After adding the zones, you can edit or delete them from the main window as shown in Figure 21-1.

After adding, editing, or deleting a zone, you must choose click the Save button or select File => Save to write the /etc/named.conf configuration file and all the individual zone files in the /var/named directory. Saving changes also causes the named service to reload the configuration files. Selecting File => Quit saves the changes before quitting the application.
21.1. Adding a Forward Master Zone

To add a forward master zone (also known as a primary master), click the New button, select Forward Master Zone, and enter the domain name for the master zone in the Domain name text area.

A new window as shown in Figure 21-2 will appear with the following options:

*

Name — Domain name that was just entered in the previous window.
*

File Name — File name of the DNS database file, relative to /var/named. It is preset to the domain name with .zone appended to it.
*

Contact — Email address of the main contact for the master zone.
*

Primary Nameserver (SOA) — State of authority (SOA) record. This specifies the nameserver that is the best resource of information for this domain.
*

Serial Number — The serial number of the DNS database file. This number must be incremented each time the file is changed, so that the slave nameservers for the zone will retrieve the latest data. The Bind Configuration Tool increments this number each time the configuration changes. It can also be incremented manually by clicking the Set button next to the Serial Number value.
*

Time Settings — The Refresh, Retry, Expire, and Minimum TTL (Time to Live) values that are stored in the DNS database file. All values are in seconds.
*

Records — Add, edit, and delete record resources of type Host, Alias, and Name server.

Figure 21-2. Adding a Forward Master Zone

A Primary Nameserver (SOA) must be specified, and at least one nameserver record must be specified by clicking the Add button in the Records section.

After configuring the Forward Master Zone, click OK to return to the main window as shown in Figure 21-1. From the pulldown menu, click Save to write the /etc/named.conf configuration file, write all the individual zone files in the /var/named directory, and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone "forward.example.com" {
type master;
file "forward.example.com.zone";
};

It also creates the file /var/named/forward.example.com.zone with the following information:

$TTL 86400
@ IN SOA ns.example.com. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


IN NS 192.168.1.1.


21.2. Adding a Reverse Master Zone

To add a reverse master zone, click the New button and select Reverse Master Zone. Enter the first three octets of the IP address range that you want to configure. For example, if you are configuring the IP address range 192.168.10.0/255.255.255.0, enter 192.168.10 in the IP Address (first 3 Octets) text area.

A new window will appear, as shown in Figure 21-3, with the following options:

1.

IP Address — The first three octets that you just entered in the previous window.
2.

Reverse IP Address — Non-editable. Pre-populated based on the IP Address entered.
3.

Contact —Email address of the main contact for the master zone.
4.

File Name — File name of DNS database file in the /var/named directory.
5.

Primary Nameserver (SOA) — State of authority (SOA) record. This specifies the nameserver that is the best resource of information for this domain.
6.

Serial Number — The serial number of the DNS database file. This number must be incremented each time the file is changed, so that the slave nameservers for the zone will retrieve the latest data. The Bind Configuration Tool increments this number each time the configuration changes. It can also be incremented manually by clicking the Set button next to the Serial Number value.
7.

Time Settings — The Refresh, Retry, Expire, and Minimum TTL (Time to Live) values that are stored in the DNS database file.
8.

Nameservers — Add, edit, and delete name servers for the reverse master zone. At least one nameserver is required.
9.

Reverse Address Table — List of IP addresses within the reverse master zone and their hostnames. For example, for the reverse master zone 192.168.10, you can add 192.168.10.1 in the Reverse Address Table with the hostname one.example.com. The hostname must end with a period (.) to specify that it is a full hostname.

Figure 21-3. Adding a Reverse Master Zone

A Primary Nameserver (SOA) must be specified, and at least one nameserver record must be specified by clicking the Add button in the Nameservers section.

After configuring the Reverse Master Zone, click OK to return to the main window as shown in Figure 21-1. From the pulldown menu, click Save to write the /etc/named.conf configuration file, write all the individual zone files in the /var/named directory, and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone "10.168.192.in-addr.arpa" {
type master;
file "10.168.192.in-addr.arpa.zone";
};

It also creates the file /var/named/10.168.192.in-addr.arpa.zone with the following information:

$TTL 86400
@ IN SOA ns.example.com. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)


@ IN NS ns2.example.com.

1 IN PTR one.example.com.
2 IN PTR two.example.com.

21.3. Adding a Slave Zone

To add a slave zone (also known as a secondary master), click the New button and select Slave Zone. Enter the domain name for the slave zone in the Domain name text area.

A new window will appear, as shown in Figure 21-4, with the following options:

*

Name — The domain name that was entered in the previous window.
*

Masters List — The nameservers from which the slave zone retrieves its data. Each value must be a valid IP address. You can only enter numbers and periods (.) in the text area.
*

File Name — File name of the DNS database file in /var/named.

Figure 21-4. Adding a Slave Zone

After configuring the slave zone, click OK to return to the main window as shown in Figure 21-1. Click Save to write the /etc/named.conf configuration file and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone "slave.example.com" {
type slave;
file "slave.example.com.zone";
masters {
1.2.3.4;
};
};

The configuration file /var/named/slave.example.com.zone is created by the named service when it downloads the zone data from the master server(s).
sumber http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-bindconf.html

Setting DHCP Server pada Redhat 9

18.2. Configuring a DHCP Server

You can configure a DHCP server using the configuration file /etc/dhcpd.conf.

DHCP also uses the file /var/lib/dhcp/dhcpd.leases to store the client lease database. Refer to Section 18.2.2 Lease Database for more information.
18.2.1. Configuration File

The first step in configuring a DHCP server is to create the configuration file that stores the network information for the clients. Global options can be declared for all clients, or options can be declared for each client system.

The configuration file can contain any extra tabs or blank lines for easier formatting. The keywords are case-insensitive, and lines beginning with a hash mark (#) are considered comments.

Two DNS update schemes are currently implemented — the ad-hoc DNS update mode and the interim DHCP-DNS interaction draft update mode. If and when these two are accepted as part of the IETF standards process, there will be a third mode — the standard DNS update method. The DHCP server must be configured to use one of the two current schemes. Version 3.0b2pl11 and previous version used the ad-hoc mode; however, it has been depreciated. If you want to keep the same behavior, add the following line to the top of the configuration file:

ddns-update-style ad-hoc;

To use the recommended mode, add the following line to the top of the configuration file:

ddns-update-style interim;

Read the dhcpd.conf man page for details about the different modes.

There are two types of statements in the configuration file:

*

Parameters — state how to perform a task, whether to perform a task, or what network configuration options to send to the client.
*

Declarations — describe the topology of the network, describe the clients, provide addresses for the clients, or apply a group of parameters to a group of declarations.

Some parameters must start with the option keyword and are referred to as options. Options configure DHCP options; whereas, parameters configure values that are not optional or control how the DHCP server behaves.

Parameters (including options) declared before a section enclosed in curly brackets ({ }) are considered global parameters. Global parameters apply to all the sections below it.
Important Important


If you change the configuration file, the changes will not take effect until you restart the DHCP daemon with the command service dhcpd restart.

In Example 18-1, the routers, subnet-mask, domain-name, domain-name-servers, and time-offset options are used for any host statements declared below it.

As shown in Example 18-1, you can declare a subnet. You must include a subnet declaration for every subnet in your network. If you do not, the DHCP server will fail to start.

In this example, there are global options for every DHCP client in the subnet and a range declared. Clients are assigned an IP address within the range.

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;

option domain-name "example.com";
option domain-name-servers 192.168.1.1;

option time-offset -18000; # Eastern Standard Time

range 192.168.1.10 192.168.1.100;
}

Example 18-1. Subnet Declaration

All subnets that share the same physical network should be declared within a shared-network declaration as shown in Example 18-2. Parameters within the shared-network but outside the enclosed subnet declarations are considered global parameters. The name of the shared-network should be a descriptive title for the network such as test-lab to describe all the subnets in a test lab environment.

shared-network name {
option domain-name "test.redhat.com";
option domain-name-servers ns1.redhat.com, ns2.redhat.com;
option routers 192.168.1.254;
more parameters for EXAMPLE shared-network
subnet 192.168.1.0 netmask 255.255.255.0 {
parameters for subnet
range 192.168.1.1 192.168.1.31;
}
subnet 192.168.1.32 netmask 255.255.255.0 {
parameters for subnet
range 192.168.1.33 192.168.1.63;
}
}

Example 18-2. Shared-network Declaration

As demonstrated in Example 18-3, the group declaration can be used to apply global parameters to a group of declarations. You can group shared networks, subnets, hosts, or other groups.

group {
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;

option domain-name "example.com";
option domain-name-servers 192.168.1.1;

option time-offset -18000; # Eastern Standard Time

host apex {
option host-name "apex.example.com";
hardware ethernet 00:A0:78:8E:9E:AA;
fixed-address 192.168.1.4;
}

host raleigh {
option host-name "raleigh.example.com";
hardware ethernet 00:A1:DD:74:C3:F2;
fixed-address 192.168.1.6;
}
}

Example 18-3. Group Declaration

To configure a DHCP server that leases a dynamic IP address to a system within a subnet, modify Example 18-4 with your values. It declares a default lease time, maximum lease time, and network configuration values for the clients. This example assigns IP addresses in the range 192.168.1.10 and 192.168.1.100 to client systems.

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "example.com";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
}

Example 18-4. Range Parameter

To assign an IP address to a client based on the MAC address of the network interface card, use the hardware ethernet parameter within a host declaration. As demonstrated in Example 18-5, the host apex declaration specifies that the network interface card with the MAC address 00:A0:78:8E:9E:AA always receives the IP address 192.168.1.4.

Notice that you can also use the optional parameter host-name to assign a host name to the client.

host apex {
option host-name "apex.example.com";
hardware ethernet 00:A0:78:8E:9E:AA;
fixed-address 192.168.1.4;
}

Example 18-5. Static IP Address using DHCP
Tip Tip


You can use the sample configuration file in Red Hat Linux 9 as a starting point and then add your own custom configuration options to it. Copy it to its proper location with the command

cp /usr/share/doc/dhcp-/dhcpd.conf.sample /etc/dhcpd.conf

(where is the DHCP version you are using).

For a complete list of option statements and what they do, refer to the dhcp-options man page.
18.2.2. Lease Database

On the DHCP server, the file /var/lib/dhcp/dhcpd.leases stores the DHCP client lease database. This file should not be modified by hand. DHCP lease information for each recently assigned IP address is automatically stored in the lease database. The information includes the length of the lease, to whom the IP address has been assigned, the start and end dates for the lease, and the MAC address of the network interface card that was used to retrieve the lease.

All times in the lease database are in Greenwich Mean Time (GMT), not local time.

The lease database is recreated from time to time so that it is not too large. First, all known leases are saved in a temporary lease database. The dhcpd.leases file is renamed dhcpd.leases~, and the temporary lease database is written to dhcpd.leases.

The DHCP daemon could be killed or the system could crash after the lease database has been renamed to the backup file but before the new file has been written. If this happens, there is no dhcpd.leases file that is required to start the service. Do not create a new lease file if this occurs. If you do, all the old leases will be lost and cause many problems. The correct solution is to rename the dhcpd.leases~ backup file to dhcpd.leases and then start the daemon.
18.2.3. Starting and Stopping the Server
Important Important


Before you start the DHCP server for the first time, it will fail unless there is an existing dhcpd.leases file. Use the command touch /var/lib/dhcp/dhcpd.leases to create the file if it does not exist.

To start the DHCP service, use the command /sbin/service dhcpd start. To stop the DHCP server, use the command /sbin/service dhcpd stop. If you want the daemon to start automatically at boot time, see Chapter 14 Controlling Access to Services for information on how to manage services.

If you have more than one network interface attached to the system, but you only want the DHCP server to start on one of the interface, you can configure the DHCP server to start only on that device. In /etc/sysconfig/dhcpd, add the name of the interface to the list of DHCPDARGS:

# Command line options here
DHCPDARGS=eth0

This is useful if you have a firewall machine with two network cards. One network card can be configured as a DHCP client to retrieve an IP address to the Internet. The other network card can be used as a DHCP server for the internal network behind the firewall. Specifying only the network card connected to the internal network makes the system more secure because users can not connect to the daemon via the Internet.

Other command line options that can be specified in /etc/sysconfig/dhcpd include:

*

-p — Specify the udp port number on which dhcpd should listen. The default is port 67. The DHCP server transmits responses to the DHCP clients at a port number one greater than the udp port specified. For example, if you accept the default of port 67, the server listens on port 67 for requests and responses to the client on port 68. If you specify a port here and use the DHCP relay agent, you must specify the same port on which the DHCP relay agent should listen. See Section 18.2.4 DHCP Relay Agent for details.
*

-f — Run the daemon as a foreground process. This is mostly used for debugging.
*

-d — Log the DHCP server daemon to the standard error descriptor. This is mostly used for debugging. If this is not specified, the log is written to /var/log/messages.
*

-cf filename — Specify the location of the configuration file. The default location is /etc/dhcpd.conf.
*

-lf filename — Specify the location of the lease database file. If a lease database file already exists, it is very important that the same file be used every time the DHCP server is started. It is strongly recommended that this option only be used for debugging purposes on non-production machines. The default location is /var/lib/dhcp/dhcpd.leases.
*

-q — Do not print the entire copyright message when starting the daemon.

18.2.4. DHCP Relay Agent

The DHCP Relay Agent (dhcrelay) allows you to relay DHCP and BOOTP requests from a subnet with no DHCP server on it to one or more DHCP servers on other subnets.

When a DHCP client requests information, the DHCP Relay Agent forwards the request to the list of DHCP servers specified when the DHCP Relay Agent is started. When a DHCP server returns a reply, the reply is broadcast or unicast on the network that sent the original request.

The DHCP Relay Agent listens for DHCP requests on all interfaces unless the interfaces are specified in /etc/sysconfig/dhcrelay with the INTERFACES directive.

To start the DHCP Relay Agent, use the command service dhcrelay start.

Selasa, 10 Maret 2009

Perintah sederhana linux

Sekelumit tentang linux PDF Cetak E-mail
Ditulis oleh Administrator
Friday, 10 March 2006

Tulisan ini diolah dan diambil seperlunya dari beberapa sumber, salah satunya dari "From Dos to Linux howto" ditulis olehGuido Gonzato, guido@ibogfs.df.unibo.it .Berikut ini adalah beberapa perintah dasar yang biasa digunakan dalam linux/unix,



1. Melihat isi direktori.
[Dos] dir
[Linux] ls -l (atau gunakan ls -la untuk menampilkan semua file termasuk yang beratribut hidden)(Untuk melihat kapasitas yang masih tersisa gunakan perintah df )
[Contoh] ls -l /home

2. Pindah direktori
[Dos] cd
[Linux] cd


3. Membuat direktori
[Dos] mkdir atau md
[Linux] mkdir
[Contoh] mkdir nama direktori

4. Menghapus direktori
[Dos] rmdir atau rd
[Linux] rm -r
[Contoh] rm -rf namadirektori

5. Menampilkan lokasi direktori yang sedang aktif
[Dos] chdir
[Linux] pwd
[Contoh] pwd

6. Menghapus file
[Dos] del
[Linux] rm
[Contoh] rm namafile

7. Menyalin file
[Dos] copy
[Linux] cp (Gunakan perintah cp -R untuk menyalin direktory berikut isinya)
[Contoh] cp namafile1 namafile2

8. Mengganti nama file
[Dos] rename atau move
[Linux] mv
[Contoh] mv namafilelama namafilebaru

9. Menampilkan isi file dalam bentuk ASCII ke layar
[Dos] type
[Linux] cat
[Contoh] cat namafile

10. Menampilkan menu bantuan
[Dos] help atau namaperintah /?
[Linux] man namaperintah atau namaperintah --help
[Contoh] man namaperintah atau namaperintah --help

11. Membersihkan layar
[Dos] cls
[Linux] clear
[Contoh] cls

12. Mencari kata dalam file
[Dos] find
[Linux] grep
[Contoh] grep katayangdicari namafile

13. Menunjukan waktu
[Dos] date atau time
[Linux] date
[Contoh] date

14. Meng-edit file
[Dos] edit namafile
[Linux] vi namafile atau emacs namafile atau pico namafile
[Contoh] vi namafile atau emacs namafile atau pico namafile

15. Menyembunyikan file
[Dos] attrib +h namafile (atau attrib -h namafile untuk memunculkan kembali
[Linux] Ganti namafile dengan menambahkan sebuah titik didepan (.namafile)
[Contoh] mv namafile .namafile

16. Mencek dan memperbaiki Harddisk
[Dos] scandisk
[Linux] fsck
[Contoh] fsck /dev/hda1

17. Menampilkan versi sistem operasi
[Dos] ver
[Linux] uname -a
[Contoh] uname -a

18. Mengirimkan paket ICMP
[Dos] ping alamatIP
[Linux] ping alamatIP
[Contoh] ping 192.168.0.1

19. Melakukan trace ke sebuah tujuan host dalam jaringan
[Dos] tracert alamatIP
[Linux] traceroute alamatIP
[Contoh] traceroute 192.168.0.1

20. Menampilkan konfigurasi kartu jaringan (NIC)
[Dos] ipconfig (Windows NT)
[Dos] winipcfg (Windows 95x)
[Linux] ifconfig
[Contoh] ifconfig

21.Menampilkan routing-table
[Dos] route print
[Linux] route -n atau netstat -r
[Contoh] route -n atau netstat -r

Catatan: Artikel ini dapat Anda baca juga di Koran Tempo tanggal 08 September 2003.





DOS & UNIX COMPARISON

DOS command


UNIX command


Command Description

cd


cd or chdir


Change directory

chkdsk


du


Check disk space utilization

copy


cp


Copy files

del


rm


Delete files

deltree


rm -r


Remove subdirectory

dir /b


ls


Bare directory listing

dir /s


ls -lR


Directory with subdirectories

help


man


Read a prepared Help manual

md


mkdir


Make subdirectory

move or ren


mv


Move or Rename files

rm


rmdir


Remove empty subdirectory

type


cat


Type text files to screen

|more


|pg


"Pipe More" Page break listings









DOS Utils


UNIX Utils


Command Description

arj


unarj


ARJ archiver/decompressor

edit


joe or pico


BASIC text editor

lharc or lha


lharc


LZH/LHA archiver/compression

pkzip


zip


Create .zip compressed archives

pkunzip


unzip


Unarchive and decompress .zip files



Menggunakan tar dan gzip

Tar digunakan untuk pengarsipan.Contoh klo ingin membuat arsip baru:

$ tar -cvf

Untuk melakukan pengekstrakan

$ tar -xpvf

untuk melihat list dari suatu arsip :

$ tar -tf | less

Untuk melakukan kompresi dapat digunakan kedua perintah ini:

$ compress

$ gzip

yang akan menciptakan file terkompresi dengan ekstensi .Z (compress) atau .gz (gzip) .Untuk men-dekompress :

$ compress -d

$ gzip -d

menampilkan daftar file yang terkandung di dalam .tar.gz :

$ gzip -ddc | tar tf - | less

Menginstall aplikasi

Beberapa aplikai Linux didistribusikan dalam bentuk arsip .tar.gz atau .tgz , untuk mengekstrak ketikkan perintah berikut :

$ gzip -dc | tar xvf -

File-file tersebut akan di-dekompress ke dalam direktori yang sesuai, direktori akan tercipta secara otomatis jika belum ada, lalu baca saja & ikuti petunjuk yang biasanya disertakan dalam direktori tsb.

Pengguna dari distro slackware mempunyai program yang user-friendly yaitu program pkgtool.Untuk pengguna sistem berbasis redhat(contohnya redhat sendiri,suse,mandriva,dll) terdapat rpm /redhat package manager( terimakasih buat red hat ^^ ) .Ada juga .deb untuk sistem berbasis debian, contohnya ya debian sendiri dan ubuntu.Beberapa paket program didistribusikan dalam C/C++ (source code), shg anda harus meng-compile untuk menciptakan file binary. Dalam hal ini anda membutuhkan compiler gcc.

Emulator DOS dan Windows

Emulator yang umum dan biasa dipakai untuk menjalankan aplikasi dos dan windows dalam sistem linux adalah dosemu dan wine.Biasanya digunakan untuk menjalankan file-file berekstensi .exe.Untuk mengecek apakah emulator tersebut sudah terinstal atau belum pada sistem linux kita, bisa dilakukan melalui console dengan mengetikkan nama aplikasi tersebut.Contoh:

[aswin@localhost ~]$ wine

Wine 20050725

Usage: wine PROGRAM [ARGUMENTS...] Run the specified program

wine --help Display this help and exit

wine --version Output version information and exit

Jika aplikasi tersebut belum terinstal, akan muncul informasi bahwa command tersebut tidak ditemukan:

[aswin@localhost ~]$ dosemu

bash: dosemu: command not found

Sedangkan untuk mengecek lokasinya bisa digunakan perintah which atau whereis, contoh:

[aswin@localhost ~]$ whereis wine

wine: /usr/bin/wine /usr/lib/wine /usr/include/wine /usr/share/wine /usr/share/m an/man1/wine.1.bz2

atau:

[aswin@localhost ~]$ which wine

/usr/bin/wine

Bila statement seperti diatas sudah ditemukan, berarti kita sudah siap menjalankan beberapa aplikasi windows dalam sistem linux kita dengan emulator tersebut.Jika belum....? ya diinstal dululah... ;p

Penggunaan TAB utk menyingkat

Contoh : anda ingin mengetikkan perintah: sh pliz_release_me_let_me_go_to_hell.run ; karena malas mengetikkan krn terlalu panjang, maka ketikkan saja sh pliz kemudian tekan , maka secara otomatis console akan menuliskan file tersebut.Jika terdapat file lain dengan nama yang mirip dengan yang kita inginkan, misalnya terdapat file pliz_give_me_ur_money.cpp maka untuk menunjuk file yang tadi kita inginkan bisa diketikkan dengan lsedikit lebih lengkap: sh pliz_release lalu tekan . That's all.....^^

sumber: http://samsul-060701.blogspot.com/2008/04/perintah-sederhana-linux.html

Twitter Delicious Facebook Digg Stumbleupon Favorites More