Perintah-Perintah Linux

Bagi kita masyarakat awam yang baru saja mengenali LINUX akan kesulitan pada saat melakukan kompilasi atau mengintegrasikan suatu perintah ke dalam suatu mesin. Tidak semua aplikasi di linux dapat dijalankan di GUI (General User Inreface). Untuk itu dibutuhkan yang namanya perintah di konsol berikut perintah-perintah tersebut :


dmseg = untuk melihat apa saja yang ada di komputer kita
ifconfig = untuk melihat IP pada komputer kita
reboot = Restart Komputer
halt = Shutdown
logout = Log off
ls = Menampilkan isi direktori
ps aux = Melihat apa saja program yang berjalan (windows task manager)
useradd agung = Menambah user dengan nama user agung
passwd agung = Memberikan password pada user agung
userdel agung = menghapus nama user agung
rm-rf/home/agung = Menghapus nama user agung secara permanen
usermod = Merubah data login
chfn = Merubah informasi user
—–> exp : usermod -l tamu -g umum guest –> user guest ke tamu ke group umum
groupadd = Menambah group
groupdel = Menghapus group
groupmod = Modifikasi group
who = Mengetahui siapa saja user yang sedang login
users = Mengetahui nama user yang sedang login di system
Mesg (Y/N) = Memberi pesan
Write = Pesan bersifat individual
wall = Pesan yang bersifat masal
mkdir = Membuat direktori/folder
cd = Pindah ke direktori
rmdir = Menghapus direktori
cp = Mengcopy file
r rw- r– = Membaca hak akses
chmod = Merubah hak akses
chown = Merubah kepemilikan
mv = Memindahkan file
mount = dimuat
unmount = dikembalikan
——> exp : #mount /dev/fd0, /mnt/floppy
#unmount/mnt/floppy
fdformat = format floppy disk/mkfs
——> exp : #fdformat/dev/fd0 bila sudah
#mkfs -t msdos -n agung /dev/fd0
tar = Menggabungkan beberapa file
——> exp : gzip(gz) ><><>< vi =" Teks" 9 =" Menghentikan" df =" Informasi" link =" koneksi" wget =" seperti" f7 =" Pindah" mcfv =" backup" mxpfv =" Restore" su =" Subtituse"> Mengganti user
yast = Kontrol panel seperti di windows (di suse)
Command = Description
pwd = Melihat direktori kerja saat ini
hostname = Menampilkan nama local host (mesin dimana anda sedang bekerja).
Gunakan perintah ” netconf” (sebagai root) untuk merubah nama
host dari mesin tersebut, atau edit file /etc/hosts
whoami = Mencetak login name anda
id username = Mencetak user id (uid) atau group id (gid)
date = Mencetak atau merubah tanggal dan waktu pada komputer, contoh
merubah tanggal dan waktu ke 2000-12-31 23:57 dengan perintah :
date 123123572000
time = Melihat jumlah waktu yg ditangani untuk penyelesaian suatu proses
+ info lainnya. Jangan bingung dengan perintah “date”
who = Melihat user yang login pada komputer kita.
rwho -a = Melihat semua user yg login pada network anda. Layanan perintah
rwho ini harus diaktifkan, jalankan setup sebagai root untuk
mengaktifkannya.
finger user_name = Melihat informasi user, coba jalankan : finger root
last = Melihat user sebelumnya yang telah login di komputer.
uptime = Melihat jumlah waktu pemakaian komputer oleh seseorang, terhitung
proses reboot terakhir.
ps = (=print status) Melihat proses-proses yang dijalankan oleh user
ps axu | more = Melihat seluruh proses yang dijalankan, walaupun tanpa terminal control, juga ditampilkan nama dari user untuk setiap proses.
top = Melihat proses yang berjalan, dengan urutan penggunaan cpu.
uname -a = Informasi system kernel anda
free = Informasi memory (dalam kilobytes).
df -h = (=disk free) Melihat informasi pemakaian disk pada seluruh system
(in human-readable form)
du / -bh | more = (=disk usage) Melihat secara detil pemakaian disk untuk setiap
direktori, dimulai dari root (in human legible form).
cat /proc/cpuinfo = Cpu info. Melihat file pada /proc directori yang bukan merupakan
file nyata (not real files).
cat /proc/interrupts = Melihat alamat interrupt yang dipakai.
cat /proc/version = Versi dari Linux dan informasi lainnya.
cat /proc/filesystems = Melihat filesystem yang digunakan.
cat /etc/printcap = Melihat printer yang telah disetup
lsmod = (as root) Melihat module-module kernel yang telah di load.
set|more = Melihat environment dari user yang aktif
echo $PATH = Melihat isi dari variabel “PATH”. Perintah ini dapat digunakan
untuk menampilkan variabel environmen lain dengan baik. Gunakan
“set” untuk melihat environmen secara penuh.
dmesg = Mencetak pesan-pesan pada waktu proses boot. (Menampilkan file:
/var/log/dmesg.)
ps = (=print status) Menampilkan proses yang sedang berjalan
berdasarkan nomor PID. Gunakan “ps AXU” untuk melihat seluruh
proses yang berjalan. Dan gunakan “top” untuk melihat prosese yang
berjalan berdasarkan urutan pemakaian CPU.
fg PID = Menyetop proses ke foreground
bg PID = Mengirim proses ke background. Lawan dari “fg”, atau gunakan tombol
z.
kill PID = Membunuh proses, berdasarkan nomor PID yang didapat dari perintah “ps”
killall program_name = Membunuh program berdasarkan nama program
xkill = (dalam xwindow terminal) Membunuh program dalam GUI-based dengan mouse
(letakkan pointer mouse anda pada windows yg akan dikill lalu click)
lpc = (sebagai root) untuk mengecek dan mengontrol printer
lpq = Menampilkan antrian print yang akan dilaksanakan.Under KDE
(X-Windows), anda bisa juga menggunakan program GUI-based “Printer
Queue” yang tersedia di “K”menu-Utilities.
lprm job# = Menghapus job print antrian (queue)
nice program_name = Menjalankan program berdasarkan prioritas. Dimulai sejak prioritas
tidak dijalankan secara spesifi, dalam contoh ini, prioritas akan
dilakukane bekisar 10 (proses akan berjalan lebih lambat), dari
nilai default (umumnya 0). Nilai terkecil (dari “niceness” ke user
lain pada sistem), merupakan priority tertinggi. Nilai prioritas
dapat berkisar antara -20 sampai 19. Hanya root yang bisa memasukkan
nilai negatif. Gunakan “top” untuk menampilkan nilai prioritas
proses yang sedang berjalan.
renice -1 PID = (sebagai root) Ubahlah prioritas yang sedang berjalan ke -1. Normal
users hanya dapat merubah nilai proses mereka sendiri, dan mereka
tidak dapat menaikkan nilai prioritas lebih tinggi dari yang telah ada
(atau mereka dapat membuat proses berjalan lebih lambat)

= Pindah ke text terminal pertama. Di Linux anda dapat membuka beberapa
terminal pada waktu bersamaan
= (n=1..6) Pindah ke n text terminal.
= Pindah ke GUI pertama (jika hanya 1 windows yg aktif).
= (n=7..12) Pindah ke n GUI terminal Jika GUI terminal aktif pada layar n-1)
= Autocomplete perintah (pada terminal). SHORTCUT INI SANGAT BAGUS! Bekerja
juga di LILO prompt!
= Scroll & edit perintah-perintah sebelumnya, lalu tekan [Enter] untuk
menjalankan perintahnya.
= Menggulung 1 layar ke atas pesan sebelumnya. Dengan perintah ini anda
dapat juga untuk melihat booup message
= Kebalikan dari di atas
<+> = (pada X-window) Merubah resolusi berikutnya pada X-server (jika anda
mensetup lebih dari 1 resolusi pada file XF86Config)
<-> = (pada X-window) Merubah ke resolusi sebelumnya pada X-server.
= (pada X-windows) Menutup X-window server. Gunakan jika X-windows server
anda crash dan tidak dapat exit secara normal.
= Mengshutdown sistem komputer kemudian melakukan reboot. Ini adalah
perintah normal untuk shutdown oleh user pada mode text.
c = Membunuh proses yang sedang aktif
d = Keluar dari terminal, sama dengan perintah “exit” atau “logout”
d = Mengirim [End-of-File] ke proses yang sedang berjalan
s = Menyetop proses transfer ke terminal
q = Melanjutkan proses transfer ke terminal. Gunakan jika terminal anda tidak
ada respon
z = Mengirim proses ke background.
reset = Merestore terminal yang menampilkan karakter lucu / aneh yang biasanya
disebab anda memakai perintah “cat” untuk melihat binari file. Anda tidak
akan melihat huruf yang anda ketik.
= Mempaste text yang di blok. Ini adalah perintah normal untuk
copy-paste pada Linux (Sangat bagus bila digunakan mouse dengan 3
tombol, apabila anda memiliki mouse lama dengan 2 tombol, anda harus
mengaktifkan emulate 3 button.
~ = (tanda tilde) pada My home directori. Contoh, cd ~/my_dir akan merubah
dari direktori aktif ke subdirektori “my_dir” pada home direktori.
. = (dot atau titik) digunakan untuk menjalankan program pada aktif direktori,
contoh, “./my_program” akan menjalankan file “my_program” pada direktori
aktif anda.

Buat Windows XP anda jadi kencang

Ruang-ruang yang akan kita sentuh adalah sebagai berikut :

1. System Properties
2. System Configuration
3. Registry

1. System Properties
Adalah ruang berisi informasi tentang nama dan organisasi pemilik. Anda bisa membukanya dengan klik kanan pada icon My Computer dan pilih Properties. Atau bisa juga dengan menekan tombol Start + Pause Break.

Ada beberapa rahasia yang akan kita obrak-abrik pada system properties ini, sehingga menghasilkan installasi yang optimal. Ikuti langkah berikut:

1. Klik kanan pada icon My Computer dan pilih Properties. Atau bisa juga dengan menekan tombol Start + Pause Break.
2. Klik menu System Restore, pastikan anda mengklik Turn Off System Restore On All Drives. Ini akan sangat berguna untuk menghalau salah satu cara perkembangbiakan virus.
3. Kemudian klik Advanced. Terdapat 3 menu setting di bawahnya.
1. Klik Setting pertama dan pastikan anda memilih Adjust For Best Performance. Ini akan mengubah tampilan windows anda menjadi klasik. tetapi jika ingin tetap menggunakan tampilan XP, pilih saja (beri tanda cek) pada pilihan:
1. Use visual styles on windows and buttons.
2. Smooth edges of screen fonts.
3. Use drop shadows for icon labels on the desktop (jika icon desktop diaktifkan). Lanjutkan dengan mengklik Apply.
2. Selanjutnya klik Advanced, dan klik Change untuk merubah Virtual Memory. (Virtual memory adalah Space yang dijadikan memory bayangan untuk membantu kinerja memory asli yang biasa kita sebut RAM) Virtual memory ini akan meminta ruangan dari harddisk.
3. Pada sub menu Custome Size, terdapat kolom Initial Size. Isikan kolom dengan angka minimal 2 kali jumlah RAM yang anda pasang. Misalnya anda memasang RAM 128 MB, maka isi kolom tersebut dengan jumlah minimal 256. Dan pada kolom berikutnya isi dengan 2 x kolom pertama. Jangan lupa klik Set . Klik OK dan OK lagi sehingga kembali ke System Properties awal.
4. Sekarang, klik menu Setting yang ketiga, anda akan melihat dua kolom yang berisi angka 30. Rubah angka tersebut menjadi 3. Kemudian buang tanda Ceklis (v) pada Automatically Restart.
5. Klik OK setelah selesai.
6. Tutup System Properties dengan mengklik OK.


2. System Configuration
Ruang berikutnya yang akan kita bedah adalah System Configuration . Perhatikan langkah berikut :

1. Klik Start pilih Run dan ketik msconfig kemudian Ok atau langsung tekan Enter.
2. Dideretan menu bagian atas, di ujung kanan terdapat menu Startup. Klik menu tersebut.
3. Lihat ke bagian bawah, terdapat sederetan nama dengan masing-masing mempunyai tanda ceklis (v).

Nama-nama tersebut adalah indikasi program yang akan selalu berjalan ketika Windows baru pertama kali tampil. Dan jika kita membiarkan tanda ceklisnya, maka Windows akan sedikit lambat ketika pertama kali proses Loading .

1. Buang tanda ceklis pada nama program yang dianggap tidak perlu untuk ditampilkan pada waktu START UP. Kemudian klik Apply
2. Klik OK untuk menutup System Configuration dan klik Restart.

Setelah komputer Restart dan kembali ke ruangan Desktop , anda dikagetkan dengan munculnya kotak dialog yang tentu saja berbahasa inggris. Langsung saja klik kotak kecil untuk memberi ceklis pada Don't Show This Massage kemudian klik OK. Maka kotak tadi tidak akan muncul lagi ketika Windows baru Restart .


3. Registry
Registry adalah ruang Administrator Windows. Keluar masuknya program yang terinstall akan selalu melapor terlebih dahulu ke Registry.

Berikut ini adalah directory yang terdapat di Registry yang akan kita obrak-abrik:

1. HKEY_CLASSES_ROOT
2. HKEY_CURRENT_USER
3. HKEY_LOCAL_MACHINE
4. HKEY_USERS
5. HKEY_CURRENT_CONFIG


Yang akan kita sentuh adalah bagian 1 dan 2. Ikuti langkah berikut:

1. Klik Start pilih Run dan ketik regedit, klik OK atau langsung tekan Enter.
2. Klik tanda plus (+) pada HKEY_CURRENT_USER
3. Klik tanda plus (+) pada Control Panel
4. Klik tanda plus (+) pada Desktop

Perhatikan jendela sebelah kanan pada posisi Desktop. Terdapat sederetan String yang cukup memusingkan dan tentu saja berbahasa Inggris. Cari dan temukan MenuShowDelay. Jika sudah ketemu, klik dua kali dan rubah nilainya dari 400 menjadi 0, kemudian klik OK.

* Sekarang kembali ke jendela sebelah kiri
* Dibawah directory Desktop terdapat sub directory WindowsMetrics. Klik sub directory tersebut dan perhatikan jendela sebelah kanan.
* Cari dan temukan MinAnimate, klik dua kali pada value tersebut dan rubah nilainya menjadi 1, klik OK.

Sekarang tutup Registry dengan tombol Alt + F4 atau dengan mengklik tanda silang X dibagian atas kanan jendela. Restart Komputer anda dan lihat hasilnya.

Basic MS-DOS Commands

ADDUSERS Add or list users to/from a CSV file
ARP Address Resolution Protocol
ASSOC Change file extension associations
ASSOCIAT One step file association
AT Schedule a command to run at a later time
ATTRIB Change file attributes

BOOTCFG Edit Windows boot settings
BROWSTAT Get domain, browser and PDC info

CACLS Change file permissions
CALL Call one batch program from another
CD Change Directory - move to a specific Folder
CHANGE Change Terminal Server Session properties
CHKDSK Check Disk - check and repair disk problems
CHKNTFS Check the NTFS file system
CHOICE Accept keyboard input to a batch file
CIPHER Encrypt or Decrypt files/folders
CleanMgr Automated cleanup of Temp files, recycle bin
CLEARMEM Clear memory leaks
CLIP Copy STDIN to the Windows clipboard.
CLS Clear the screen
CLUSTER Windows Clustering
CMD Start a new CMD shell
COLOR Change colors of the CMD window
COMP Compare the contents of two files or sets of files
COMPACT Compress files or folders on an NTFS partition
COMPRESS Compress individual files on an NTFS partition
CON2PRT Connect or disconnect a Printer
CONVERT Convert a FAT drive to NTFS.
COPY Copy one or more files to another location
CSVDE Import or Export Active Directory data

DATE Display or set the date
Dcomcnfg DCOM Configuration Utility
DEFRAG Defragment hard drive
DEL Delete one or more files
DELPROF Delete NT user profiles
DELTREE Delete a folder and all subfolders
DevCon Device Manager Command Line Utility
DIR Display a list of files and folders
DIRUSE Display disk usage
DISKCOMP Compare the contents of two floppy disks
DISKCOPY Copy the contents of one floppy disk to another
DNSSTAT DNS Statistics
DOSKEY Edit command line, recall commands, and create macros
DSADD Add user (computer, group..) to active directory
DSQUERY List items in active directory
DSMOD Modify user (computer, group..) in active directory

ECHO Display message on screen
ENDLOCAL End localisation of environment changes in a batch file
ERASE Delete one or more files
EXIT Quit the CMD shell
EXPAND Uncompress files
EXTRACT Uncompress CAB files

FC Compare two files
FDISK Disk Format and partition
FIND Search for a text string in a file
FINDSTR Search for strings in files
FOR /F Loop command: against a set of files
FOR /F Loop command: against the results of another command
FOR Loop command: all options Files, Directory, List
FORFILES Batch process multiple files
FORMAT Format a disk
FREEDISK Check free disk space (in bytes)
FSUTIL File and Volume utilities
FTP File Transfer Protocol
FTYPE Display or modify file types used in file extension associations

GLOBAL Display membership of global groups
GOTO Direct a batch program to jump to a labelled line

HELP Online Help
HFNETCHK Network Security Hotfix Checker

IF Conditionally perform a command
IFMEMBER Is the current user in an NT Workgroup
IPCONFIG Configure IP

KILL Remove a program from memory

LABEL Edit a disk label
LOCAL Display membership of local groups
LOGEVENT Write text to the NT event viewer.
LOGOFF Log a user off
LOGTIME Log the date and time in a file

MAPISEND Send email from the command line
MEM Display memory usage
MD Create new folders
MODE Configure a system device
MORE Display output, one screen at a time
MOUNTVOL Manage a volume mount point
MOVE Move files from one folder to another
MOVEUSER Move a user from one domain to another
MSG Send a message
MSIEXEC Microsoft Windows Installer
MSINFO Windows NT diagnostics
MSTSC Terminal Server Connection (Remote Desktop Protocol)
MUNGE Find and Replace text within file(s)
MV Copy in-use files

NET Manage network resources
NETDOM Domain Manager
NETSH Configure network protocols
NETSVC Command-line Service Controller
NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)
NOW Display the current Date and Time
NSLOOKUP Name server lookup
NTBACKUP Backup folders to tape
NTRIGHTS Edit user account rights

PATH Display or set a search path for executable files
PATHPING Trace route plus network latency and packet loss
PAUSE Suspend processing of a batch file and display a message
PERMS Show permissions for a user
PERFMON Performance Monitor
PING Test a network connection
POPD Restore the previous value of the current directory saved by PUSHD
PORTQRY Display the status of ports and services
PRINT Print a text file
PRNCNFG Display, configure or rename a printer
PRNMNGR Add, delete, list printers set the default printer
PROMPT Change the command prompt
PsExec Execute process remotely
PsFile Show files opened remotely
PsGetSid Display the SID of a computer or a user
PsInfo List information about a system
PsKill Kill processes by name or process ID
PsList List detailed information about processes
PsLoggedOn Who's logged on (locally or via resource sharing)
PsLogList Event log records
PsPasswd Change account password
PsService View and control services
PsShutdown Shutdown or reboot a computer
PsSuspend Suspend processes
PUSHD Save and then change the current directory

QGREP Search file(s) for lines that match a given pattern.

RASDIAL Manage RAS connections
RASPHONE Manage RAS connections
RECOVER Recover a damaged file from a defective disk.
REG Read, Set or Delete registry keys and values
REGEDIT Import or export registry settings
REGSVR32 Register or unregister a DLL
REGINI Change Registry Permissions
REM Record comments (remarks) in a batch file
REN Rename a file or files.
REPLACE Replace or update one file with another
RD Delete folder(s)
RDISK Create a Recovery Disk
RMTSHARE Share a folder or a printer
ROBOCOPY Robust File and Folder Copy
ROUTE Manipulate network routing tables
RUNAS Execute a program under a different user account
RUNDLL32 Run a DLL command (add/remove print connections)

SC Service Control
SCHTASKS Create or Edit Scheduled Tasks
SCLIST Display NT Services
ScriptIt Control GUI applications
SET Display, set, or remove environment variables
SETLOCAL Control the visibility of environment variables
SETX Set environment variables permanently
SHARE List or edit a file share or print share
SHIFT Shift the position of replaceable parameters in a batch file
SHORTCUT Create a windows shortcut (.LNK file)
SHOWGRPS List the NT Workgroups a user has joined
SHOWMBRS List the Users who are members of a Workgroup
SHUTDOWN Shutdown the computer
SLEEP Wait for x seconds
SOON Schedule a command to run in the near future
SORT Sort input
START Start a separate window to run a specified program or command
SU Switch User
SUBINACL Edit file and folder Permissions, Ownership and Domain
SUBST Associate a path with a drive letter
SYSTEMINFO List system configuration

TASKLIST List running applications and services
TIME Display or set the system time
TIMEOUT Delay processing of a batch file
TITLE Set the window title for a CMD.EXE session
TOUCH Change file timestamps
TRACERT Trace route to a remote host
TREE Graphical display of folder structure
TYPE Display the contents of a text file

USRSTAT List domain usernames and last login

VER Display version information
VERIFY Verify that files have been saved
VOL Display a disk label

WHERE Locate and display files in a directory tree
WHOAMI Output the current UserName and domain
WINDIFF Compare the contents of two files or sets of files
WINMSD Windows system diagnostics
WINMSDP Windows system diagnostics II
WMIC WMI Commands

XCACLS Change file permissions
XCOPY Copy files and folders