/
) :-
/bin
– aplikasi biner penting
-
/boot
– lokasi berkas konfigurasi untuk boot.
-
/dev
– berkas peranti (device)
-
/etc
– berkas konfigurasi, skrip startup, dll (etc)…
-
/home
– direktori pangkal (home) untuk pengguna
-
/lib
– libraries yang diperlukan oleh sistem
-
/lost+found
– menyediakan sistem lost+found untuk berkas yang berada dibawah direktori root (/
)
-
/media
– mount (memuat) removable media seperti CD-ROM, kamera digital, dll…
-
/mnt
– untuk me-mount sistem berkas
-
/opt
– tempat lokasi untuk menginstal aplikasi tambahan (optional)
-
/proc
– direktori dinamis khusus yang menangani informasi mengenai kondisi sistem, termasuk proses-proses (processes) yang sedang berjalan
-
/root
– direktori pangkal untuk root, diucapkan ‘slash-root’
-
/sbin
– sistem biner penting
-
/sys
– mengandung informasi mengenai system
-
/tmp
– berkas sementara (temporary)
-
/usr
– tempat aplikasi dan berkas yang sering digunakan oleh pengguna (users)
-
/var
– berkas variabel seperti log dan database
Terminal
Bekerja dengan baris perintah tidaklah tugas yang menakutkan seperti yang Anda pikir sebelumnya. Tidak dibutuhkan pengetahuan khusus untuk mengetahui bagaimana menggunakan baris perintah, ini adalah program seperti yang lainnya. Semua tugas di Linux dapat diselesaikan menggunakan baris perintah, walaupun telah ada alat berbasis grafik untuk semua program, tetapi kadang-kadang itu semua tidak cukup. Disinilah baris perintah akan membantu Anda.Terminal berada di Applications->Terminal . Terminal sering disebut command prompt atau shell. Di masa lalu, hal ini adalah cara pengguna untuk berinteraksi dengan komputer, dan para pengguna Linux berpendapat bahwa penggunaan perintah melalui shell akan lebih cepat dibanding melalui aplikasi berbasis grafik dan hal ini masih berlaku sampai sekarang. Disini Anda akan mempelajari bagaimana menggunakan terminal.
Pindah ke mode Konsol
Metode umum untuk mengakses baris perintah di Ubuntu adalah dengan menjalankan terminal (lihat “Menjalankan Terminal” di atas)- Gunaka shortcut Ctrl-Alt-F1 untuk pindah ke konsol satu.
- Untuk kembali ke mode Desktop, gunakan shortcut Ctrl-Alt-F7.
![]() | |
Ada tersedia enam buah konsol. Setiap konsol dapat diakses dengan shortcut Ctrl-Alt-F1 ke Ctrl-Alt-F6. |
Menonaktifkan suara tit di mode Terminal
- Jalankan sesi Terminal, pilih: Applications->Accessories->Terminal dari sistem menu desktop.
- Edit->Current Profile… . Pilih tab General. Uncheck checkboxTerminal bell.
Perbedaan terminal pada setiap versi ubuntu
In Gnome (Ubuntu)
The terminal can be found at Applications menu -> Accessories -> Terminal.
In Xfce (Xubuntu)
The terminal can be found at Applications menu -> System -> Terminal.In KDE (Kubuntu)
The terminal can be found at KMenu -> System -> Terminal Program (Konsole).
Perintah umum di terminal
- Menilik Direktori – ls
- Perintah ls (LiSt) melihat daftar berkas dalam suatu direktori.
- Membuat Direktori: – mkdir (nama direktori)
- Perintah mkdir (MaKeDIRectory) untuk membuat direktori.
- Mengubah Direktori: – cd (/direktori/lokasi)
- Perintah cd perintah (ChangeDirectory) akan mengubah dari direktori Anda saat ini ke direktori yang Anda tentukan.
- Menyalin Berkas/Direktori: – cp (nama berkas atau direktori) (ke direktori atau nama berkas)
- Perintah cp (CoPy) akan menyalin setiap berkas yang Anda tentukan. Perintah cp -r akan menyalin setiap direktori yang Anda tentukan.
- Menghapus Berkas/Direktori: – rm (nama berkas atau direktori)
- Perintah rm perintah (ReMove) akan menghapus setiap berkas yang Anda tentukan. Perintah rm -rf akan menghapus setiap direktori yang Anda tentukan.
- Ganti Name Berkas/Direktori – mv (nama berkas atau direktori)
- Perintah mv (MoVe) akan mengganti nama/memindahkan setiap berkas atau direktori yang Anda tentukan.
- Mencari Berkas/Direktori: – mv (nama berkas atau direktori)
- Perintah locate akan setiap nama berkas yang anda tentukan yang ada di dalam komputer. Perintah ini menggunakan indeks dari berkas dalam sistem Anda untuk bekerja dengan cepat: untuk memutakhirkan indeks ini jalankan perintah updatedb. Perintah ini berjalan otomatis setiap hari, apabila komputer Anda nyala terus setiap hari. Dan perintah ini harus dijalankan dengan hak istimewa administratif (lihat “Root Dan Sudo”).
File & Directory Commands
- pwd: The pwd command will allow you to know in which directory you’re located (pwd stands for “print working directory”). Example: “pwd” in the Desktop directory will show “~/Desktop”. Note that the Gnome Terminal also displays this information in the title bar of its window.
- ls: The ls command will show you the files in your current directory. Used with certain options, you can see sizes of files, when files were made, and permissions of files. Example: “ls ~” will show you the files that are in your home directory.
- cd: The cd command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use cd. Examples:
- To navigate into the root directory, use “cd /”
- To navigate to your home directory, use “cd” or “cd ~”
- To navigate up one directory level, use “cd ..”
- To navigate to the previous directory (or back), use “cd -”
- To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, “cd /var/www” to go directly to the /www subdirectory of /var/. As another example, “cd ~/Desktop” will move you to the Desktop subdirectory inside your home directory.
- To navigate into the root directory, use “cd /”
- cp: The cp command will make a copy of a file for you. Example: “cp file foo” will make a exact copy of “file” and name it “foo”, but the file “file” will still be there. If you are copying a directory, you must use “cp -r directory foo” (copy recursively).
- mv: The mv command will move a file to a different location or will rename a file. Examples are as follows: “mv file foo” will rename the file “file” to “foo”. “mv foo ~/Desktop” will move the file “foo” to your Desktop directory but will not rename it. You must specify a new file name to rename a file.
- To save on typing, you can substitute ‘~’ in place of the home directory.
- Note that if you are using mv with sudo you can use the ~ shortcut, because the terminal expands the ~ to your home directory. However, when you open a root shell with sudo -i or sudo -s, ~ will refer to the root account’s home directory, not your own.
- rm: Use this command to remove or delete a file in your directory.
- rmdir: The rmdir command will delete an empty directory. To delete a directory and all of its contents recursively, use rm -r instead.
- mkdir: The mkdir command will allow you to create directories. Example: “mkdir music” will create a directory called “music”.
- man: The man command is used to show you the manual of other commands. Try “man man” to get the man page for man itself. See the “Man & Getting Help” section down the page for more information.
System Information Commands
- df: The df command displays filesystem disk space usage for all mounted partitions. “df -h” is probably the most useful – it uses megabytes (M) and gigabytes (G) instead of blocks to report. (-h means “human-readable”)
- du: The du command displays the disk usage for a directory. It can either display the space used for all subdirectories or the total for the directory you run it on. Example:
user@users-desktop:~$ du /media/floppy1032 /media/floppy/files1036 /media/floppy/user@users-desktop:~$ du -sh /media/floppy1.1M /media/floppy/
- -s means “Summary” and -h means “Human Readable”
- free: The free command displays the amount of free and used memory in the system. “free -m” will give the information using megabytes, which is probably most useful for current computers.
- top: The top command displays information on your Linux system, running processes and system resources, including CPU, RAM & swap usage and total number of tasks being run. To exit top, press “q”.
- uname -a: The uname command with the -a option prints all system information, including machine name, kernel name & version, and a few other details. Most useful for checking which kernel you’re using.
- lsb_release -a: The lsb_release command with the -a option prints version information for the Linux release you’re running, for example:
user@computer:~$ lsb_release -aNo LSB modules are available.Distributor ID: Ubunt
Tidak ada komentar:
Posting Komentar