0% found this document useful (0 votes)
38 views5 pages

Linux System Administration: 1. List

The document provides instructions for 20 common Linux system administration commands, including ls, cd, tail, head, cat, mkdir, sort, uniq, grep, cp, mv, ssh, touch, pwd, locate, find, rmdir, rm, and ifconfig. It also includes a system health check section that outlines commands to check server specifications, CPU load, disk I/O, RAM usage, file system usage, and more.

Uploaded by

Dito Prbaowo
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)
38 views5 pages

Linux System Administration: 1. List

The document provides instructions for 20 common Linux system administration commands, including ls, cd, tail, head, cat, mkdir, sort, uniq, grep, cp, mv, ssh, touch, pwd, locate, find, rmdir, rm, and ifconfig. It also includes a system health check section that outlines commands to check server specifications, CPU load, disk I/O, RAM usage, file system usage, and more.

Uploaded by

Dito Prbaowo
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
You are on page 1/ 5

LINUX SYSTEM ADMINISTRATION

1. List
Menampilkan detail:
ls - l
Mengurutkan berdasarkan waktu:
ls -t
Mengurutkan berdasarkan ukuran file:
ls -S
Mengurutkan berdasarkan tipe file:
ls -F
Menampilkan ukuran file yang human friendly:
ls -h

2. Change Direction
cd

3. Tail
Menampilkan baris akhir sebanyak n
[perintah lain] | tail -n
Monitoring perubahan file
tail -f [nama file]

4. Head
Menampilkan baris awal sebanyak n
[perintah lain] | head -n

5. Right Direction
Replace isi dari file output
cat /proc/cpuinfo > command.txt

6. Double Right Direction


Insert sesuatu pada file output
cat /proc/cpuinfo | wc -l >> command.txt

7. Left Direction
File sebagai input (yang diproses)
wc -l < command.txt

8. Error Direction
Memasukkan error pada file output
mkdir Music 2> myerror.txt (replace)
mkdir Music 2>> myerror.txt (insert)

9. Sort
Mengurutkan isi file (per baris)
sort -u [namafile]

10. Uniq
Menghitung jumlah elemen per nilai dalam data
uniq -c [namafile]

11. Grep
Mencari kata dalam suatu file
[perintah] | grep [keyword]

12. Copy
Copy semua file dalam satu direktori
cp * [direktori tujuan]
Copy semua file dan sub direktori
cp -R * [direktori tujuan]
Copy file
cp [namafile] [direktori tujuan]
Copy tanpa merubah date timestamps
cp -p
13. Move
Jika belum ada nama, membuat file baru. Jika sudah ada nama,
memindahkan
mv

14. SSH
Komputer A SSH komputer B
ssh B@ip
A kirim file ke B
scp [nama file] B@ip:direktori
B mengambil file dari A
scp A@ip:direktori [direktori lokal]
SSH tanpa password
sshpass -p [password]
ssh A@ip [perintah]

15. Create New File


Membuat file baru
touch [nama file]

16. Check Direction


Menampilkan alamat direktori aktif
pwd

17. Locate
Mencari file pada semua direktori
locate [keyword]

18. Find
Mencari file pada direktori aktif
Find [keyword]
19. Remove
Menghapus folder yang kosong
rmdir
Menghapus file
rm [direktori file]
Menghapus semua isi direktori
rm [direktori]

20. Check IP Address


Mengecek IP Addres
ifconfig
System Health Check

Server Specification

Server Type $ cat /proc/cpuinfo | grep name

Machine Type (HT) $ cat /proc/cpuinfo | grep processor | wc -l

Serial Number $ sudo su


$ dmidecode -t System | grep Serial

Hostname $ hostname

Kernel Version $ uname -r

IP Address / VIP $ ifconfig


$ ipaddr

Operasi System $ cat /etc/*release

Uptime $ uptime

CPU Load $ htop


$ top

Disk I/O Write $ sudo su


$ dd if=dev/zero of=/root/ddtest bs=4MB count=1024

Disk I/O Read $ sudo su


$ dd of=dev/zero if=/root/ddtest bs=4MB count=1024

RAM Usage $ free -mh

Root Usage $ df -h /

SWAP Usage $ free -mh

/tmp Usage $ df -h /tmp

You might also like