0% found this document useful (0 votes)
4 views2 pages

Ubuntu Command Line Basics Guide

Uploaded by

filialavina.arsa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Ubuntu Command Line Basics Guide

Uploaded by

filialavina.arsa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Ubuntu Linux Command Line with Examples

Navigasi & File Management


- pwd -> lokasi direktori saat ini
contoh: pwd
- ls -> lihat isi folder
contoh: ls -l
- cd <folder> -> pindah direktori
contoh: cd /home/user
- mkdir <nama_folder> -> buat folder baru
contoh: mkdir project
- touch <file> -> buat file kosong
contoh: touch [Link]
- cp <sumber> <tujuan> -> copy file
contoh: cp [Link] [Link]
- mv <sumber> <tujuan> -> pindah/rename file
contoh: mv [Link] [Link]
- rm <file> -> hapus file
contoh: rm [Link]
- rm -r <folder> -> hapus folder beserta isinya
contoh: rm -r folder_lama
Sistem & Informasi
- whoami -> user login
contoh: whoami
- uname -a -> detail sistem
contoh: uname -a
- df -h -> cek disk space
contoh: df -h
- du -sh <folder> -> cek ukuran folder
contoh: du -sh Downloads/
- free -h -> cek RAM
contoh: free -h
- uptime -> lama sistem hidup
contoh: uptime
User & Permission
- sudo <command> -> jalankan command sebagai root
contoh: sudo ls /root
- adduser <nama> -> tambah user
contoh: sudo adduser filia
- passwd <nama> -> ganti password user
contoh: sudo passwd filia
- chmod <izin> <file> -> ubah permission
contoh: chmod 755 [Link]
- chown <user>:<group> <file> -> ubah pemilik
contoh: sudo chown user:user [Link]
Package Management (APT)
- sudo apt update -> update daftar paket
contoh: sudo apt update
- sudo apt upgrade -> upgrade paket
contoh: sudo apt upgrade -y
- sudo apt install <paket> -> install aplikasi
contoh: sudo apt install git
- sudo apt remove <paket> -> hapus aplikasi
contoh: sudo apt remove firefox
- sudo apt autoremove -> hapus paket tidak terpakai
contoh: sudo apt autoremove
Networking
- ping <alamat> -> cek koneksi
contoh: ping [Link]
- ip a -> cek IP address
contoh: ip a
- wget <url> -> download file
contoh: wget [Link]
- curl <url> -> ambil konten dari URL
contoh: curl [Link]
- ssh user@host -> login ke server via SSH
contoh: ssh user@[Link]
Search & View
- cat <file> -> tampilkan isi file
contoh: cat [Link]
- less <file> -> lihat isi file panjang
contoh: less [Link]
- head -n <angka> <file> -> tampilkan awal file
contoh: head -n 5 [Link]
- tail -n <angka> <file> -> tampilkan akhir file
contoh: tail -n 10 [Link]
- grep "kata" <file> -> cari teks
contoh: grep "error" [Link]
- find /path -name <nama> -> cari file
contoh: find /home/user -name [Link]
Proses & Service
- ps aux -> lihat semua proses
contoh: ps aux | grep firefox
- kill <PID> -> hentikan proses
contoh: kill 1234
- systemctl status <service> -> status service
contoh: systemctl status apache2
- systemctl start <service> -> jalankan service
contoh: sudo systemctl start apache2
- systemctl restart <service> -> restart service
contoh: sudo systemctl restart apache2
Arsip & Kompresi
- tar -czvf [Link] folder -> kompres
contoh: tar -czvf [Link] folder/
- tar -xzvf [Link] -> extract
contoh: tar -xzvf [Link]
- zip -r [Link] folder -> kompres zip
contoh: zip -r [Link] folder/
- unzip [Link] -> extract zip
contoh: unzip [Link]
Lain-lain
- history -> lihat riwayat command
contoh: history
- clear -> bersihkan terminal
contoh: clear
- alias nama='perintah' -> shortcut command
contoh: alias ll='ls -la'

You might also like