Basic Linux dokokin a kan Linux da Windows Operating Systems

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.

Idan ka shigar Cygwin a kan Windows to, tsoho hanyar lokacin da ka fara da Cygwin m zai zama:



Create new allon rubutu fayil misali

touch textfile.txt


Change shugabanci

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


Nuna halin yanzu location (print working directory)



Cire karshe 100 maganar fayil

tail -100 {filename.extension}


Cire farko 100 layuka na fayil

head -100 {filename.extension}


Kwafe fayil

cp {source} {destination}


Matsar fayil

mv {source} {destination}


Yi sabon shugabanci

mkdir {new directory name}


Share fayil

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}


Warware abinda ke ciki na wani fayil

sort {filename to sort}


Cire Kwafin shigarwar a cikin wani file

uniq {filename to remove duplicates}


Damfara fayiloli

gzip {filename}


Damfara shugabanci

gzip -r {directory name}


Ƙidaya yawan layuka da kalmomi a cikin wani rubutu fayil

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


Nuni abun ciki na wani rubutu fayil



sed stream editor (similar to find and replace)

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


Canza fayil kuma shugabanci izini

chmod {options} {permissions} {filename}


Jerin 'yan dokokin amfani



Ta atomatik tsara ayyuka



Change fayil izini

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


Canja recursive fayil izini

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



Leave a Reply