Minggu, 14 November 2010

Sistem Operasi Berbasis CLI

A-antarmuka baris perintah (CLI) adalah sebuah mekanisme untuk berinteraksi dengan komputer sistem operasi atau perangkat lunak dengan mengetikkan perintah untuk melakukan tugas-tugas tertentu. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface ( GUI ) to click on options, or menus on a text user interface (TUI) to select options. Ini hanya antar muka teks kontras dengan penggunaan pointer mouse dengan antarmuka pengguna grafis (GUI) untuk klik pada pilihan, atau menu pada user interface teks (TUI) untuk memilih opsi. This method of instructing a computer to perform a given task is referred to as "entering" a command: the system waits for the user to conclude the submitting of the text command by pressing the "Enter" key (a descendant of the "carriage return" key of a typewriter keyboard). Metode ini memerintahkan komputer untuk melakukan tugas yang diberikan ini disebut sebagai "memasukkan" perintah: sistem menunggu pengguna untuk menyimpulkan pengajuan perintah teks dengan menekan tombol "Enter" (keturunan kembali "carriage "kunci keyboard mesin ketik). A command-line interpreter then receives, analyses , and executes the requested command. A -line command interpreter kemudian menerima, menganalisa , dan menjalankan perintah yang diminta. The command-line interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as PuTTY . The-baris command interpreter dapat dijalankan dalam terminal teks atau dalam sebuah terminal emulator jendela sebagai klien remote shell seperti PuTTY . Upon completion, the command usually returns output to the user in the form of text lines on the CLI. Setelah selesai, perintah biasanya mengembalikan output kepada pengguna dalam bentuk baris teks pada CLI. This output may be an answer if the command was a question, or otherwise a summary of the operation. Output ini mungkin jawaban jika perintah itu pertanyaan, atau ringkasan operasi.
The concept of the CLI originated when teletypewriter machines (TTY) were connected to computers in the 1950s, and offered results on demand, compared to batch oriented mechanical punched card input technology. Konsep CLI berasal ketika teletip mesin (TTY) yang terhubung ke komputer pada 1950-an, dan menawarkan hasil pada permintaan, dibandingkan dengan batch mekanik berorientasi kartu punched Teknologi input. Dedicated text-based CRT terminals followed, with faster interaction and more information visible at one time, then graphical terminals enriched the visual display of information. Dedicated berbasis teks CRT terminal diikuti, dengan interaksi yang lebih cepat dan informasi lebih terlihat pada satu waktu, maka terminal grafis memperkaya tampilan visual informasi. Currently personal computers encapsulate all three functions (batch processing, CLI, GUI) in software. Saat ini komputer pribadi menyembunyikan seluruh tiga fungsi (batch processing, CLI, GUI) dalam perangkat lunak.
The CLI continues to co-evolve with GUIs like those provided by Microsoft Windows , Mac OS and the X Window System . CLI terus bersama-berevolusi dengan GUI seperti yang disediakan oleh Microsoft Windows , Mac OS dan X Window System . In some applications, such as MATLAB and AutoCAD , a CLI is integrated with the GUI, with some benefits of both. Pada beberapa aplikasi, seperti MATLAB dan AutoCAD , sebuah CLI terintegrasi dengan GUI, dengan beberapa manfaat dari keduanya.

Penggunaan

A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. Sebuah CLI digunakan setiap kali kosakata besar perintah atau query, ditambah dengan rentang (atau sewenang-wenang) macam pilihan, dapat dimasuki lebih cepat sebagai teks dibandingkan dengan GUI yang murni. This is typically the case with operating system command shells . Ini biasanya terjadi dengan sistem operasi perintah kerang . Also, some computer languages (such as Python , Forth , LISP and many dialects of BASIC ) provide an interactive command-line mode to allow for experimentation. Juga, bahasa komputer beberapa (seperti Python , Forth , LISP dan banyak dialek BASIC ) memberikan mode command-line interaktif untuk memungkinkan eksperimen.
CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs sering digunakan oleh programmer dan administrator sistem, dalam lingkungan teknik dan ilmiah, dan maju secara teknis pengguna komputer pribadi. CLIs are also popular among people with visual disability, since the commands and feedbacks can be displayed using Refreshable Braille displays . CLIs juga populer di kalangan para penyandang cacat visual, karena perintah dan umpan balik dapat ditampilkan dengan menggunakan Braille menampilkan Refreshable .
A program that implements such a text interface is often called a command-line interpreter or shell . Sebuah program yang mengimplementasikan antarmuka teks seperti sering disebut -baris command interpreter atau shell . Examples include the various Unix shells (sh, ksh, csh, tcsh, bash, etc.), the historical CP/M , and MS-DOS/IBM-DOS 's COMMAND.COM , the latter two based heavily on DEC's RSX and RSTS CLIs. Contohnya termasuk berbagai Unix kerang (sh, ksh, csh, tcsh, bash, dll), sejarah CP / M , dan MS-DOS/IBM-DOS 's COMMAND.COM , dua terakhir berdasarkan berat pada Desember's RSX dan RSTS CLIs. (DOS, ie MS-DOS/IBM-DOS, is actually is based on CP/M, DOS having been originally written as a substitute for CP/M-86 when its release was delayed.) (DOS, MS-DOS/IBM-DOS yaitu, sebenarnya didasarkan pada CP / M, DOS yang telah awalnya ditulis sebagai pengganti untuk CP/M-86 ketika rilis tertunda.)
In November 2006, Microsoft released version 1.0 of Windows PowerShell (formerly codenamed Monad ), which combined features of traditional Unix shells with their object-oriented .NET Framework . MinGW and Cygwin are open-source packages for Windows that offer a Unix-like CLI. Pada bulan November 2006, Microsoft merilis versi 1.0 dari Windows PowerShell (dahulu nama sandi Monad), yang dikombinasikan fitur kerang Unix tradisional dengan mereka berorientasi objek- Framework. NET . MinGW dan Cygwin yang open-source paket untuk Windows yang menawarkan seperti CLI Unix . Microsoft provides MKS Inc. 's ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on. Microsoft menyediakan MKS Inc 's ksh Korn shell pelaksanaan MKS untuk Windows melalui mereka Services untuk UNIX pengaya.
The latest versions of the Macintosh operating system are based on a variation of Unix called Darwin . Versi terbaru dari Macintosh sistem operasi didasarkan pada variasi Unix yang disebut Darwin . On these computers, users can access a Unix-like command-line interface called Terminal found in the Applications Utilities folder. Pada komputer ini, pengguna dapat mengakses antarmuka baris perintah Unix seperti disebut Terminal ditemukan di folder Applications Utilities. (This terminal uses bash by default.) (Terminal ini menggunakan bash secara default.)
Screenshot of the MATLAB 7.4 command-line interface and GUI. Screenshot dari MATLAB antarmuka baris perintah 7.4 dan GUI.
Some applications provide both a CLI and a GUI. Beberapa aplikasi menyediakan baik CLI dan GUI. The engineering/scientific numerical computation package MATLAB provides no GUI for some calculations, but the CLI can handle any calculation. teknik ini / ilmiah numerik perhitungan paket MATLAB tidak menyediakan GUI untuk beberapa perhitungan, tetapi CLI dapat menangani perhitungan apapun. The three-dimensional-modelling program Rhinoceros 3D provides a CLI as well as a distinct scripting language. The-dimensi-modeling program tiga Rhinoceros 3D menyediakan CLI serta bahasa scripting yang berbeda. In some computing environments, such as the Oberon or Smalltalk user interface, most of the text which appears on the screen may be used for giving commands. Dalam beberapa lingkungan komputasi, seperti Oberon atau Smalltalk user interface, sebagian besar dari teks yang muncul pada layar dapat digunakan untuk memberikan perintah.

Anatomi shell CLI

A CLI can generally be considered as consisting of syntax and semantics . Sebuah CLI umum dapat dianggap sebagai terdiri dari sintaks dan semantik . The syntax is the grammar that all commands must follow. Sintaksnya adalah tata bahasa bahwa semua perintah harus mengikuti. In the case of operating systems (OS), MS-DOS and Unix each define their own set of rules that all commands must follow. Dalam kasus sistem operasi (OS), MS-DOS dan Unix masing-masing menetapkan menetapkan sendiri aturan bahwa semua perintah harus mengikuti. In the case of embedded systems , each vendor, such as Nortel , Juniper Networks or Cisco Systems , defines their own proprietary set of rules that all commands within their CLI conform to. Dalam kasus embedded system , masing-masing vendor, seperti Nortel , Juniper Networks atau Cisco Systems , mendefinisikan milik mereka sendiri seperangkat aturan bahwa semua perintah di dalam mereka CLI sesuai dengan. These rules also dictate how a user navigates through the system of commands . Aturan-aturan ini juga menentukan bagaimana pengguna menavigasi sistem perintah . The semantics define what sort of operations are possible, on what sort of data these operations can be performed, and how the grammar represents these operations and data—the symbolic meaning in the syntax. Semantik mendefinisikan apa macam operasi yang mungkin, dari apa data operasi ini dapat dilakukan, dan bagaimana tata bahasa yang mewakili operasi ini dan data-makna simbolik dalam sintaks.
Two different CLIs may agree on either syntax or semantics, but it is only when they agree on both that they can be considered sufficiently similar to allow users to use both CLIs without needing to learn anything, as well as to enable re-use of scripts. Dua CLIs berbeda mungkin setuju di kedua sintaks atau semantik, tetapi hanya jika mereka setuju pada kedua bahwa mereka dapat dianggap cukup mirip untuk memungkinkan pengguna untuk menggunakan kedua CLIs tanpa perlu belajar sesuatu, serta untuk memungkinkan penggunaan kembali skrip .
A simple CLI will display a prompt, accept a "command line" typed by the user terminated by the Enter key , then execute the specified command and provide textual display of results or error messages. Sebuah CLI sederhana akan menampilkan prompt, menerima "baris perintah" diketik oleh pengguna dihentikan oleh tombol Enter , kemudian jalankan perintah yang ditentukan dan memberikan tampilan tekstual hasil atau pesan kesalahan. Advanced CLIs will validate, interpret and parameter-expand the command line before executing the specified command, and optionally capture or redirect its output. Advanced CLIs akan memvalidasi, menafsirkan dan parameter-memperluas baris perintah sebelum menjalankan perintah yang ditentukan, dan opsional menangkap atau redirect output.
Unlike a button or menu item in a GUI, a command line is typically self-documenting, stating exactly what the user wants done. Tidak seperti tombol atau item menu di GUI, baris perintah biasanya mendokumentasikan diri, menyatakan apa yang pengguna ingin dilakukan. In addition, command lines usually include many defaults that can be changed to customize the results. Selain itu, baris perintah biasanya mencakup banyak default yang dapat diubah untuk menyesuaikan hasilnya. Useful command lines can be saved by assigning a character string or alias to represent the full command, or several commands can be grouped to perform a more complex sequence — for instance, compile the program, install it, and run it — creating a single entity, called a command procedure or script which itself can be treated as a command. baris perintah yang berguna bisa diselamatkan dengan memberikan karakter string atau alias untuk mewakili perintah penuh, atau beberapa perintah dapat dikelompokkan untuk melakukan urutan yang lebih kompleks - misalnya, mengkompilasi program, install, dan menjalankannya - menciptakan satu kesatuan , disebut prosedur perintah atau script yang dengan sendirinya dapat diperlakukan sebagai sebuah perintah. These advantages mean that a user must figure out a complex command or series of commands only once, because they can be saved, to be used again. Keuntungan ini berarti bahwa pengguna harus mencari tahu perintah kompleks atau serangkaian perintah hanya sekali, karena mereka dapat disimpan, untuk digunakan lagi.
The commands given to a CLI shell are often in one of the following forms: Perintah diberikan kepada shell CLI sering di salah satu dari bentuk sebagai berikut:
  • [doSomething] [how] [toFiles]
  • [doSomething] [how] [sourceFile] [destinationFile]
  • [doSomething] [how] < [inputFile] > [outputFile]
  • [doSomething] [how] | [doSomething] [how] | [do Something] [how] > [outputFile]
doSomething is, in effect, a verb , how an adverb (for example, should the command be executed "verbosely" or "quietly") and toFiles an object or objects (typically one or more files) on which the command should act. doSomething adalah, pada dasarnya, sebuah kata kerja , bagaimana keterangan (misalnya, harus perintah dijalankan "verbosely" atau "tenang") dan toFiles suatu obyek atau benda (biasanya satu atau lebih file) yang perintah harus bertindak. The '>' in the third example is a redirection operator , telling the command-line interpreter to send the output of the command not to the screen but to the file named on the right of the '>'. The '>' pada contoh ketiga adalah redirection operator , mengatakan kepada-line interpreter perintah untuk mengirim output dari perintah untuk tidak layar tetapi untuk file yang bernama di sebelah kanan dari '>'. This will overwrite the file. Ini akan menimpa file. Using '>>' will redirect the output and append it to the file. Menggunakan '>>' akan redirect output dan menambahkan pada file. Another redirection operator is the pipe ('|'), which tells the CLI to use the output of one command as the input to the next command; this "operator-stream" mechanism can be very powerful. Pengalihan operator lainnya adalah pipa ('|'), yang menceritakan CLI untuk menggunakan output dari satu perintah sebagai input untuk perintah selanjutnya; ini "operator-stream" mekanisme bisa sangat kuat.

Bahasa pemrograman di modus interaktif

Some programming languages (such as BASIC , Python , LISP , Forth , Tcl ...) also provide an interactive command line for experimentation or even for normal everyday work. Beberapa bahasa pemrograman (seperti BASIC , Python , LISP , Keempat , Tcl ...) juga menyediakan baris perintah interaktif untuk eksperimen atau bahkan untuk pekerjaan sehari-hari normal.

CLI dan perlindungan sumber daya

In some CLIs, the commands issued are not coupled to any conceptual place within a command hierarchy. Dalam beberapa CLIs, perintah-perintah yang diterbitkan tidak digabungkan ke tempat konseptual dalam hirarki perintah. A user can specify relative or absolute paths to any command or data. Seorang pengguna dapat menentukan relatif atau absolut path untuk setiap perintah atau data. Examples of this include MS-DOS, Windows, and UNIX, which provide forms of a change directory command which allows access to any directory in the system. Contoh ini termasuk MS-DOS, Windows, dan UNIX, yang memberikan bentuk sebuah direktori perubahan perintah yang memungkinkan akses ke direktori dalam sistem. In some systems, protection of resources is provided by a system of resource ownership by privileged groups, and password-protected user accounts which are members of specific groups. Dalam beberapa sistem, perlindungan sumber daya disediakan oleh sistem kepemilikan sumber daya oleh kelompok hak istimewa, dan account pengguna yang dilindungi sandi yang menjadi anggota kelompok tertentu. MS-DOS provides no such resource protection, nor do versions of Windows prior to the Windows NT family. MS-DOS tidak memberikan perlindungan sumber daya tersebut, juga tidak versi Windows sebelum keluarga Windows NT. (Both of these were designed as single-user systems, where it was assumed that the owner would simply not allow people that she/he did not fully trust to have physical access to the computer at all. UNIX, by contrast, originated as a time-sharing system in corporate and university environments.) (Kedua dirancang sebagai sistem single-user, di mana diasumsikan bahwa pemiliknya tidak hanya akan memungkinkan orang bahwa dia / dia tidak sepenuhnya percayai untuk memiliki akses fisik ke komputer sama sekali UNIX,. Sebaliknya, berasal sebagai time-sharing sistem di lingkungan perusahaan dan universitas.)
Other CLIs (such as those in network routers) limit the set of commands that a user can perform to a subset, determined by location within a command hierarchy, grouped by association with security, system, interface, etc. The location within this hierarchy and the options available are often referred to as a mode. CLIs lain (seperti yang ada di router jaringan) membatasi seperangkat perintah bahwa seorang pengguna dapat melakukan ke subset, ditentukan oleh lokasi dalam hirarki perintah, dikelompokkan oleh asosiasi dengan keamanan, sistem interface, dll Lokasi di dalam hirarki ini dan pilihan yang tersedia sering disebut sebagai modus. In these systems the user might traverse through a series of sub-hierarchies, each with their own subset of commands. Dalam sistem ini pengguna mungkin melintasi melalui serangkaian sub-hirarki, masing-masing dengan subset mereka sendiri perintah. For example, if the CLI had two modes called interface and system , the user would enter the word 'interface' at the command prompt and then enter an interface mode, where a certain subset of commands and data are available. Sebagai contoh, jika CLI memiliki dua mode yang disebut antarmuka dan sistem, pengguna akan memasuki antarmuka 'kata' pada command prompt dan kemudian memasukkan modus antarmuka, di mana subset tertentu dari perintah dan data yang tersedia. At this point system commands are not accessible and would not be accessible until the user explicitly exits the interface mode and enters the system mode. Pada titik ini perintah sistem tidak dapat diakses dan tidak akan diakses sampai pengguna keluar secara eksplisit mode interface dan memasuki modus sistem.

[ edit ] Command prompt [ sunting ] Command prompt

A command prompt (or just prompt ) is a sequence of (one or more) characters used in a command-line interface to indicate readiness to accept commands. Sebuah perintah prompt (atau hanya prompt) merupakan urutan (satu atau lebih) karakter yang digunakan dalam-line antarmuka perintah untuk menunjukkan kesiapan untuk menerima perintah. Its intent is to literally prompt the user to take action. Tujuannya adalah untuk benar-benar meminta pengguna untuk mengambil tindakan. A prompt usually ends with one of the characters $ , % , # , : , > and often includes other information, such as the path of the current working directory . Sebuah prompt biasanya berakhir dengan salah satu karakter $,%, #,:,> dan sering mencakup informasi lainnya, seperti jalur arus direktori kerja .
On many Unix system and derivative systems, it is common for the prompt to end in a $ or % character if the user is a normal user, but in a # character if the user is a superuser ("root" in Unix terminology). Pada banyak Unix sistem dan sistem derivatif, adalah umum bagi prompt untuk mengakhiri dalam atau karakter% $ jika pengguna adalah user biasa, tapi dalam karakter # jika pengguna adalah superuser ("root" di Unix terminologi).
It is common for prompts to be modifiable by the user. Hal ini umum untuk meminta dapat dimodifikasi oleh pengguna. Depending on the environment, they may include colors, special characters, and other elements like the current time, in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands. Tergantung pada lingkungan, mereka mungkin termasuk warna, karakter khusus, dan elemen lain seperti waktu saat ini, dalam rangka, misalnya, untuk membuat prompt lebih menyenangkan informatif atau visual, untuk membedakan berbagai sesi pada mesin, atau untuk mengindikasikan tingkat dari sarang perintah.
In DOS's COMMAND.COM and in the Windows NT's command-line interpreter cmd.exe the prompt is modifiable by issuing a prompt command or by changing the value of the %PROMPT% environment variable . Dalam DOS COMMAND.COM dan di baris perintah-penerjemah Windows NT adalah cmd.exe prompt ini dimodifikasi dengan mengeluarkan prompt perintah atau dengan mengubah nilai %PROMPT% variabel lingkungan . The default of most modern systems, the C:\> style is obtained, for instance, with " prompt $P$G ". Default sistem paling modern, di C:\> gaya diperoleh, misalnya, dengan " prompt $P$G ". The default of older DOS systems, C> is obtained by just " prompt ", although on some systems this produces the newer C:\> style; on those systems " prompt $N$G " can be used to switch to the older style. Default sistem DOS yang lebih tua, C> diperoleh dengan hanya " prompt ", meskipun pada beberapa sistem ini menghasilkan yang lebih baru C:\> gaya; pada sistem-sistem " prompt $N$G "dapat digunakan untuk beralih ke gaya yang lebih tua .
On many Unix systems, the $PS1 variable can be used, although other variables also may have an impact on the prompt (depending on what shell is being used). Pada sistem Unix banyak, $PS1 variabel dapat digunakan, meskipun variabel lain mungkin juga berdampak pada prompt (tergantung pada apa shell yang sedang digunakan). In the bash shell, a prompt of the form Dalam bash shell, prompt dalam bentuk
[time] user@host: work_dir $
could be set by issuing the command dapat diatur dengan menerbitkan perintah
export PS1='[\t] \u@\H: \W $'
In zsh the $RPROMPT variable controls an optional "prompt" on the right hand side of the display. Dalam zsh dalam $RPROMPT variabel kontrol opsional "prompt" di sisi kanan layar. It is not a real prompt in that the location of text entry does not change. Ini bukan prompt nyata di lokasi entri teks tidak berubah. It is used to display information on the same line as the prompt, but right justified. Hal ini digunakan untuk menampilkan informasi pada baris yang sama seperti prompt, tapi benar dibenarkan.
In RISC OS, the command prompt is a '*' symbol, and thus (OS)CLI commands are often referred to as "star commands" [ 1 ] . Dalam RISC OS, perintah prompt adalah simbol '*', dan dengan demikian (OS) perintah CLI sering disebut sebagai "bintang perintah" [1] . It is also possible to access the same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a '*'. Hal ini juga memungkinkan untuk mengakses perintah yang sama dari baris perintah lainnya (seperti BBC BASIC baris perintah), dengan mendahului perintah dengan 'a' *

http://translate.google.co.id/translate?hl=id&langpair=en|id&u=http://en.wikipedia.org/wiki/Command-line_interface 

0 komentar:

Posting Komentar