Basic Linux Misugo sa Linux ug Windows Operating System

Kini nga sinulat mao ang mapuslanon alang sa mga tawo nga buot na nagsugod sa Linux sugo. Here you will find the most common commands that are used in Linux.

Kon gusto sa pagdagan Linux mga sugo sa Windows unya instalar Cygwin. Cygwin is a Linux layer on top of Windows that allows you to use Linux commands in Windows.

Kon instalar Cygwin sa Windows unya ang default dalan sa diha nga ikaw magsugod sa Cygwin terminal mahimong:

C:\cygwin64\home\{username}

 

Paghimo bag-o nga notbok file panig-ingnan

touch textfile.txt

 

Change directory

cd {directory path\name}

 

List directory content in long format ( -l ) including hidden files and directories ( -sa usa ka )

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

 

Ipakita kasamtangan nga lugar (print working directory)

pwd

 

Kinuha sa miaging 100 pulong sa usa ka file

tail -100 {filename.extension}

 

Kinuha una 100 laray sa usa ka file

head -100 {filename.extension}

 

Kopyaha sa usa ka file

cp {source} {destination}

 

Mobalhin sa usa ka file

mv {source} {destination}

 

Himoa nga ang usa ka bag-o nga directory

mkdir {new directory name}

 

Panas file

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}

 

Matang sa mga sulod sa usa ka file

sort {filename to sort}

 

Kuhaa hulad, kopya entries sa usa ka file

uniq {filename to remove duplicates}

 

Compress file

gzip {filename}

 

Compress directory

gzip -r {directory name}

 

Ipha ang gidaghanon sa mga laray nga gihulma ug sa mga pulong sa usa ka text file

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

 

Ipakita ang sulod sa usa ka text file

cat

 

sed stream editor (similar to find and replace)

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

 

Kausaban file ug directory Permissions

chmod {options} {permissions} {filename}

 

Ilista bag-o nga sugo nga gigamit

history

 

Awtomatikong eskedyul buluhaton

cron
crontab

 

Change file Permissions

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

 

Kausaban recursive file Permissions

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