Dhasar Linux printah ing Linux lan Windows Sistem operasi

This writing is useful for those that wish to get started with Linux commands. Here you will find the most common commands that are used in Linux.

If you would like to run Linux commands on Windows then install Cygwin. Cygwin is a Linux layer on top of Windows that allows you to use Linux commands in Windows.

Yen nginstal Cygwin ing Windows banjur path standar nalika sampeyan miwiti terminal Cygwin bakal:

C:\cygwin64\home\{username}

 

Nggawe file notepad anyar contone

touch textfile.txt

 

Ngganti direktori

cd {directory path\name}

 

List directory content in long format ( -l ) including hidden files and directories ( -a )

ls -l -a

ls -al

 

Order files and directories by the time they were last modified

ls -t

 

List directory with pause and scrolling

ls -l | less

 

Tampilake lokasi saiki (print working directory)

pwd

 

Extract pungkasan 100 tembung file

tail -100 {filename.extension}

 

Extract page 100 larik saka file

head -100 {filename.extension}

 

Nyalin file

cp {source} {destination}

 

Pindhah file

mv {source} {destination}

 

Nggawe direktori anyar

mkdir {new directory name}

 

Mbusak berkas

rm {filename}

 

Delete an empty directory

rmdir {directory to remove}
rm -d{directory to remove}

 

Delete directory and its contents

rm -r {directory to remove}
rm -R{directory to remove}

 

Ngurutake isi file

sort {filename to sort}

 

Mbusak duplikat entri ing file

uniq {filename to remove duplicates}

 

File compress

gzip {filename}

 

Compress direktori

gzip -r {directory name}

 

Count nomer saka larik lan tembung ing sawijining file teks

wc {filename}

 

Search text within files for matching string pattern (case sensitive)

grep 'word' {filename}

 

Search text within files for matching string pattern (case insensitive)

grep -i 'word' {filename}

 

Search with a directory

grep -R Arctic /home/ccuser/workspace/geography

 

Isi tampilan file teks

cat

 

sed stream editor (similar to find and replace)

sed 's/snow/rain/' forests.txt

 

Ngganti file lan direktori ijin

chmod {options} {permissions} {filename}

 

Dhaptar printah anyar digunakake

history

 

Kanthi otomatis gawe jadwal tugas

cron
crontab

 

Ijin ngganti berkas

chmod {permission number} {some file or directory}
chmod 777 /storage

 

Ngganti ijin file recursive

chmod -R {permission number} {some file or directory}

 

 

Ninggalake a Reply