Tanya :

maz,,mu tanya link perintah dasar di ubuntu dmn ?? coz baru 2hari pake ubuntu jg masih bingung bgt m GUI nya

Jawab :

Pertanyaan pertama tentu adalah : Jika anda menggunakan lingkungan GUI (Graphical User Interface) untuk bekerja sehari-hari, kenapa anda membutuhkan Command Line Interface ?

Alasan yang paling sederhana adalah kebebasan. Di Open Source anda berkuasa penuh atas sistem anda, anda bisa melakukan apa saja pada sistem anda, dan Command Line Interface atau Shell membuat anda lebih leluasa melakukan intervensi ke dalam sistem anda. Anda tetap dapat menggunakan GUI untuk kenyamanan, tapi anda dapat menggunakan shell untuk kekuasaan … 🙂

Membuka Terminal di Ubuntu

Anda dapat melakukannya di

Application → Accessories → Terminal

Atau dapat pula menggunakan shortcut keyboard anda :

Ctrl + Alt + T

Tampilan Terminal di Ubuntu Desktop

Memahami Syntax Perintah di Shell

Secara umum perintah di Shell berbentuk

Perintah opsi1 opsi2 …. opsiN

Contoh :

ls -l

Itu berarti perintahnya adalah ls dengan opsi -l

Di komputer saya perintah itu akan menghasilkan tampilan isi direktori sebagai berikut :

total 47008
 -rw-r--r-- 1 rezaervani rezaervani 47923618 2011-01-28 16:28 1412942357.rar
 -rw-r--r-- 1 rezaervani rezaervani 9084 2011-03-04 08:52 Action Research 2.odt
 -rw-r--r-- 1 rezaervani rezaervani 72 2011-02-27 05:15 alamatlikyon
 -rw-r--r-- 1 rezaervani rezaervani 593 2011-03-10 09:03 buatdistatusfesbuk
 drwxr-xr-x 3 rezaervani rezaervani 4096 2011-02-28 11:57 Desktop
 drwxr-xr-x 20 rezaervani rezaervani 4096 2011-03-17 07:08 Documents
 drwxr-xr-x 4 rezaervani rezaervani 4096 2011-03-15 19:14 Downloads
 drwxr-xr-x 2 rezaervani rezaervani 4096 2011-03-04 13:32 dwhelper
 -rw-r--r-- 1 rezaervani rezaervani 179 2011-02-26 07:39 examples.desktop
 -rw-r--r-- 1 rezaervani rezaervani 379 2011-03-01 13:34 Hasil Diskusi Hari ke-2
 -rw-r--r-- 1 root root 37150 2011-03-06 12:49 inidatanya-01.cap
 -rw-r--r-- 1 root root 515 2011-03-06 12:52 inidatanya-01.csv
 -rw-r--r-- 1 root root 603 2011-03-06 12:52 inidatanya-01.kismet.csv
 -rw-r--r-- 1 root root 1603 2011-03-06 12:52 inidatanya-01.kismet.netxml
 -rw-r--r-- 1 rezaervani rezaervani 32 2011-02-26 08:01 mukhtar
 drwxr-xr-x 12 rezaervani rezaervani 4096 2011-03-11 18:41 Music
 -rw-r--r-- 1 rezaervani rezaervani 57598 2011-03-06 12:48 New Document.odt
 -rw-r--r-- 1 rezaervani rezaervani 114 2011-02-28 08:04 notulensipertemuan
 drwxr-xr-x 6 rezaervani rezaervani 4096 2011-03-17 07:10 Pictures
 -rw-r--r-- 1 rezaervani rezaervani 3685 2011-03-02 10:42 prosedurrecoverymmc
 drwxr-xr-x 2 rezaervani rezaervani 4096 2011-02-26 07:43 Public
 -rw-r--r-- 1 root root 24 2011-03-06 08:50 replay_arp-0306-085048.cap
 -rw-r--r-- 1 rezaervani rezaervani 18 2011-03-11 22:51 Ryan
 drwxr-xr-x 2 rezaervani rezaervani 4096 2011-02-26 07:43 Templates
 drwxr-xr-x 4 rezaervani rezaervani 4096 2011-03-02 05:50 Videos

Sekarang mari kita bahas beberapa perintah Shell LINUX, Mulai dari Huruf A.

Beberapa Perintah Shell Linux

apropos : Mencari keterangan yang mengandung potongan kata yang diberikan

Contoh :

Perintah :

apropos ls

Akan menampilkan : (Sangat panjang karena banyak sekali keterangan yang mengandung huruf ls)

_llseek (2) - reposition read/write file offset
 aconnect (1) - ALSA sequencer connection manager
 add-shell (8) - add shells to the list of valid login shells
 afs_syscall (2) - unimplemented system calls
 alsactl (1) - advanced controls for ALSA soundcard driver
 alsamixer (1) - soundcard mixer for ALSA soundcard driver, with ncurses interface
 amidi (1) - read from and write to ALSA RawMIDI ports
 amixer (1) - command-line mixer for ALSA soundcard driver
 aplay (1) - command-line sound recorder and player for ALSA soundcard driver
 arecord (1) - command-line sound recorder and player for ALSA soundcard driver
 aseqdump (1) - show the events received at an ALSA sequencer port
 aseqnet (1) - ALSA sequencer connectors over network
 assert (3) - abort the program if assertion is false
 auth_destroy (3) - library routines for remote procedure calls
 authnone_create (3) - library routines for remote procedure calls
 authunix_create (3) - library routines for remote procedure calls
 authunix_create_default (3) - library routines for remote procedure calls
 backtrace_symbols (3) - support for application self-debugging
 backtrace_symbols_fd (3) - support for application self-debugging
 blockdev (8) - call block device ioctls from the command line
 break (2) - unimplemented system calls
….......
watch (1) - execute a program periodically, showing output fullscreen
 wireless (7) - Wireless Tools and Wireless Extensions
 xdr_accepted_reply (3) - library routines for remote procedure calls
 xdr_authunix_parms (3) - library routines for remote procedure calls
 xdr_callhdr (3) - library routines for remote procedure calls
 xdr_callmsg (3) - library routines for remote procedure calls
 xdr_opaque_auth (3) - library routines for remote procedure calls
 xdr_pmap (3) - library routines for remote procedure calls
 xdr_pmaplist (3) - library routines for remote procedure calls
 xdr_rejected_reply (3) - library routines for remote procedure calls
 xdr_replymsg (3) - library routines for remote procedure calls
 xlsatoms (1) - list interned atoms defined on server
 xlsclients (1) - list client applications running on a display
 xlsfonts (1) - server font list displayer for X
 XML::LibXML::Boolean (3pm) - Boolean true/false values
 XML::LibXML::ErrNo (3pm) - Structured Errors This module is based on xmlerror.h libxml2 C header file. It defines symbolic constants for all libxml2 error...
 XML::XPath::Boolean (3pm) - Boolean true/false values
 XML::XPath::PerlSAX (3pm) - A PerlSAX event generator for my weird node structure
 xprt_register (3) - library routines for remote procedure calls
 xprt_unregister (3) - library routines for remote procedure calls

whatis : sama dengan apropos, hanya saja cuma akan menampilkan kata yang utuh

Contoh :

whatis ls

Akan menampilkan

ls (1) - list directory contents 

info : menampilkan informasi tentang suatu perintah

Contoh :

Perintah :

info ls

Akan menampilkan :

File: coreutils.info, Node: ls invocation, Next: dir invocation, Up: Directory listing
10.1 `ls': List directory contents
 ==================================
The `ls' program lists information about files (of any type, including
 directories). Options and file arguments can be intermixed
 arbitrarily, as usual.
For non-option command-line arguments that are directories, by
 default `ls' lists the contents of directories, not recursively, and
 omitting files with names beginning with `.'. For other non-option
 arguments, by default `ls' lists just the file name. If no non-option
 argument is specified, `ls' operates on the current directory, acting
 as if it had been invoked with a single argument of `.'.
By default, the output is sorted alphabetically, according to the
 locale settings in effect.(1) If standard output is a terminal, the
 output is in columns (sorted vertically) and control characters are
 output as question marks; otherwise, the output is listed one per line
 and control characters are output as-is.
Because `ls' is such a fundamental program, it has accumulated many
 options over the years. They are described in the subsections below;
 within each section, options are listed alphabetically (ignoring case).
 The division of options into the subsections is not absolute, since some
 options affect more than one aspect of `ls''s operation.
Exit status:
0 success
 1 minor problems (e.g., failure to access a file or directory not
 specified as a command line argument. This happens when listing a
 directory in which entries are actively being removed or renamed.)
 2 serious trouble (e.g., memory exhausted, invalid option or failure
 to access file or directory specified as a command line argument)
Also see *note Common options::.
* Menu:
* Which files are listed::
 * What information is listed::
 * Sorting the output::
 * More details about version sort::
 * General output formatting::
 --zz-Info: (coreutils.info.gz)ls invocation, 56 lines --Top--------------------------------------------------------------------------------------------------
 Welcome to Info version 4.13. Type h for help, m for menu item.

man : menampilkan manual tentang sebuah perintah

Contoh :

man ls

Akan menampilkan :

LS(1) User Commands LS(1)
NAME
 ls - list directory contents
SYNOPSIS
 ls [OPTION]... [FILE]...
DESCRIPTION
 List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
 do not ignore entries starting with .
-A, --almost-all
 do not list implied . and ..
--author
 with -l, print the author of each file
-b, --escape
 print octal escapes for nongraphic characters
--block-size=SIZE
 use SIZE-byte blocks
-B, --ignore-backups
 do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last modification of file status information) with -l: show ctime and sort by name otherwise:
 sort by ctime
-C list entries by columns
--color[=WHEN]
 control whether color is used to distinguish file types. WHEN may be `never', `always', or `auto'
-d, --directory
 list directory entries instead of contents, and do not dereference symbolic links
-D, --dired
 generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -ls --color
Manual page ls(1) line 1

Demikian bagian pertama ini, insya Allah akan kita lanjutkan lagi di kesempatan lain di blog ini.

Semoga bermanfaat (rezaervani@gmail.com)

Bersambung

Iklan