Advertisement
Daftar Command di Linux yang Wajib Diketahui

Linux adalah sistem operasi yang sangat populer di kalangan pengembang, administrator sistem, dan pengguna teknologi. Salah satu alasan utama popularitasnya adalah kekuatan command-line interface (CLI) yang memungkinkan pengguna untuk melakukan berbagai tugas dengan cepat dan efisien. Dalam postingan ini, kita akan membahas daftar command Linux yang wajib diketahui, lengkap dengan penjelasan dan contoh penggunaannya.

1. ls - List Directory Contents

Perintah ls digunakan untuk menampilkan daftar file dan direktori dalam direktori saat ini.

Contoh:

Bash
1
2
3
ls
ls -l  # Menampilkan daftar dalam format panjang
ls -a  # Menampilkan file tersembunyi

2. cd - Change Directory

Perintah cd digunakan untuk berpindah direktori.

Contoh:

Bash
1
2
3
cd /home/user/Documents  # Pindah ke direktori Documents
cd ..  # Kembali ke direktori parent
cd ~   # Kembali ke direktori home

3. pwd - Print Working Directory

Perintah pwd menampilkan direktori saat ini.

Contoh:

Bash
1
pwd

4. mkdir - Make Directory

Perintah mkdir digunakan untuk membuat direktori baru.

Contoh:

Bash
1
2
mkdir new_folder  # Membuat direktori baru bernama new_folder
mkdir -p parent/child  # Membuat direktori beserta parent-nya

5. rm - Remove

Perintah rm digunakan untuk menghapus file atau direktori.

Contoh:

Bash
1
2
rm file.txt  # Menghapus file
rm -r folder  # Menghapus direktori secara rekursif

6. cp - Copy

Perintah cp digunakan untuk menyalin file atau direktori.

Contoh:

Bash
1
2
cp file.txt /backup/  # Menyalin file ke direktori backup
cp -r folder /backup/  # Menyalin direktori secara rekursif

7. mv - Move

Perintah mv digunakan untuk memindahkan atau mengganti nama file/direktori.

Contoh:

Bash
1
2
mv file.txt /backup/  # Memindahkan file ke direktori backup
mv old_name.txt new_name.txt  # Mengganti nama file

8. touch - Create Empty File

Perintah touch digunakan untuk membuat file kosong atau memperbarui timestamp file.

Contoh:

Bash
1
touch new_file.txt  # Membuat file baru

9. cat - Concatenate and Display File Content

Perintah cat digunakan untuk menampilkan isi file.

Contoh:

Bash
1
2
cat file.txt  # Menampilkan isi file
cat file1.txt file2.txt > combined.txt  # Menggabungkan dua file

10. more dan less - Paging File Content

Perintah more dan less digunakan untuk menampilkan isi file per halaman.

Contoh:

Bash
1
2
more long_file.txt  # Menampilkan isi file per halaman
less long_file.txt  # Menampilkan isi file dengan navigasi yang lebih fleksibel

11. grep - Global Regular Expression Print

Perintah grep digunakan untuk mencari teks dalam file.

Contoh:

Bash
1
2
grep "keyword" file.txt  # Mencari kata "keyword" dalam file
grep -i "keyword" file.txt  # Mencari tanpa memperhatikan huruf besar/kecil

12. find - Search for Files

Perintah find digunakan untuk mencari file atau direktori berdasarkan kriteria tertentu.

Contoh:

Bash
1
2
find /home/user -name "*.txt"  # Mencari file .txt di direktori /home/user
find . -type d  # Mencari semua direktori di lokasi saat ini

13. chmod - Change File Mode

Perintah chmod digunakan untuk mengubah izin file atau direktori.

Contoh:

Bash
1
2
chmod 755 script.sh  # Mengubah izin file menjadi rwxr-xr-x
chmod +x script.sh  # Menambahkan izin eksekusi

14. chown - Change File Owner

Perintah chown digunakan untuk mengubah pemilik file atau direktori.

Contoh:

Bash
1
chown user:group file.txt  # Mengubah pemilik dan grup file

15. ps - Process Status

Perintah ps digunakan untuk menampilkan proses yang sedang berjalan.

Contoh:

Bash
1
ps aux  # Menampilkan semua proses

16. kill - Terminate Processes

Perintah kill digunakan untuk menghentikan proses.

Contoh:

Bash
1
2
kill 1234  # Menghentikan proses dengan PID 1234
kill -9 1234  # Memaksa menghentikan proses

17. top - Display Linux Processes

Perintah top digunakan untuk menampilkan proses secara real-time.

Contoh:

Bash
1
top

18. df - Disk Free

Perintah df digunakan untuk menampilkan penggunaan ruang disk.

Contoh:

Bash
1
df -h  # Menampilkan penggunaan disk dalam format yang mudah dibaca

19. du - Disk Usage

Perintah du digunakan untuk menampilkan penggunaan ruang disk oleh file dan direktori.

Contoh:

Bash
1
du -sh /home/user  # Menampilkan total penggunaan ruang di direktori

20. tar - Archive Files

Perintah tar digunakan untuk membuat atau mengekstrak arsip.

Contoh:

Bash
1
2
tar -cvf archive.tar folder/  # Membuat arsip
tar -xvf archive.tar  # Mengekstrak arsip

21. wget dan curl - Download Files

Perintah wget dan curl digunakan untuk mengunduh file dari internet.

Contoh:

Bash
1
2
wget https://example.com/file.zip  # Mengunduh file
curl -O https://example.com/file.zip  # Mengunduh file dengan curl

22. ssh - Secure Shell

Perintah ssh digunakan untuk terhubung ke server remote.

Contoh:

Bash
1
ssh user@remote_host  # Terhubung ke server remote

23. scp - Secure Copy

Perintah scp digunakan untuk menyalin file antara lokal dan remote.

Contoh:

Bash
1
2
scp file.txt user@remote_host:/path/to/destination  # Menyalin file ke remote
scp user@remote_host:/path/to/file.txt .  # Menyalin file dari remote

24. rsync - Remote Sync

Perintah rsync digunakan untuk menyinkronkan file dan direktori.

Contoh:

Bash
1
rsync -avz /local/folder/ user@remote_host:/remote/folder/  # Sinkronisasi folder

25. history - Command History

Perintah history digunakan untuk menampilkan riwayat perintah yang telah dijalankan.

Contoh:

Bash
1
history

26. man - Manual Pages

Perintah man digunakan untuk menampilkan dokumentasi perintah.

Contoh:

Bash
1
man ls  # Menampilkan manual untuk perintah ls

27. alias - Create Command Aliases

Perintah alias digunakan untuk membuat alias perintah.

Contoh:

Bash
1
alias ll='ls -la'  # Membuat alias ll untuk ls -la

28. echo - Display Message

Perintah echo digunakan untuk menampilkan pesan atau variabel.

Contoh:

Bash
1
2
echo "Hello, World!"
echo $HOME  # Menampilkan nilai variabel HOME

29. export - Set Environment Variables

Perintah export digunakan untuk menetapkan variabel lingkungan.

Contoh:

Bash
1
export PATH=$PATH:/new/path  # Menambahkan direktori ke PATH

30. uname - System Information

Perintah uname digunakan untuk menampilkan informasi sistem.

Contoh:

Bash
1
uname -a  # Menampilkan semua informasi sistem

Ini hanyalah sebagian kecil dari perintah Linux yang tersedia. Linux memiliki ratusan perintah yang dapat membantu Anda dalam berbagai tugas, mulai dari manajemen file hingga administrasi sistem. Dengan mempelajari dan menguasai perintah-perintah ini, Anda dapat meningkatkan produktivitas dan efisiensi Anda dalam menggunakan Linux.

Jika Anda ingin mempelajari lebih lanjut, jangan ragu untuk menjelajahi dokumentasi resmi atau menggunakan perintah man untuk melihat panduan lengkap tentang perintah tertentu.

Advertisement
Share Post Simaster
Comment
×

Terms and Conditions

Last updated: 15 February 2025

Please read the terms and conditions of this service (the terms and conditions of the service are at Privacy Policy and also Disclaimer) with caution before using the Master Wifi Network Solution website operated by Muhammad Yusuf.

×

Privacy Policy for Master Wifi Network Solution

At Master Wifi Network Solution, accessible from https://masterwifinetworksolution.github.io, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by Master Wifi Network Solution and how we use it.

If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us through email at myarachma92@gmail.com.

Log Files

Master Wifi Network Solution follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.

Cookies and Web Beacons

Like any other website, Master Wifi Network Solution uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information.

Google DoubleClick DART Cookie

Google is one of a third-party vendor on our site. It also uses cookies, known as DART cookies, to serve ads to our site visitors based upon their visit to www.website.com and other sites on the internet. However, visitors may choose to decline the use of DART cookies by visiting the Google ad and content network Privacy Policy at the following URL – https://policies.google.com/technologies/ads

Our Advertising Partners

Some of advertisers on our site may use cookies and web beacons. Our advertising partners are listed below. Each of our advertising partners has their own Privacy Policy for their policies on user data. For easier access, we hyperlinked to their Privacy Policies below.

Privacy Policies

You may consult this list to find the Privacy Policy for each of the advertising partners of Master Wifi Network Solution.

Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on Master Wifi Network Solution, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.

Note that Master Wifi Network Solution has no access to or control over these cookies that are used by third-party advertisers.

Third Party Privacy Policies

Master Wifi Network Solution's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options.

You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites.

Children's Information

Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.

Master Wifi Network Solution does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.

Online Privacy Policy Only

Our Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in Master Wifi Network Solution. This policy is not applicable to any information collected offline or via channels other than this website.

Consent

By using our website, you hereby consent to our Privacy Policy and agree to its Terms and Conditions.

Update

This Privacy Policy was last updated on: 15 February 2025. Should we update, amend, or make any changes to our privacy policy, those changes will be posted here.

×

Disclaimer for Master Wifi Network Solution

Welcome to Master Wifi Network Solution!

If you require any more information or have any questions about our site's disclaimer, please feel free to contact us by email at myarachma92@gmail.com.

Disclaimers for Master Wifi Network Solution

All the information on this website - masterwifinetworksolution.github.io - is published in good faith and for general information purpose only. Master Wifi Network Solution does not make any warranties about the completeness, reliability, and accuracy of this information. Any action you take upon the information you find on this website (Master Wifi Network Solution), is strictly at your own risk. Master Wifi Network Solution will not be liable for any losses and/or damages in connection with the use of our website.

From our website, you can visit other websites by following hyperlinks to such external sites. While we strive to provide only quality links to useful and ethical websites, we have no control over the content and nature of these sites. These links to other websites do not imply a recommendation for all the content found on these sites. Site owners and content may change without notice and may occur before we have the opportunity to remove a link which may have gone 'bad'.

Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control. Please be sure to check the Privacy Policies of these sites as well as their "Terms of Service" before engaging in any business or uploading any information.

Consent

By using our website, you hereby consent to our disclaimer and agree to its terms.

Update

Should we update, amend or make any changes to this document, those changes will be prominently posted here.

Last updated: 15 February 2025