Linux msingi Amri juu ya Linux na Windows mifumo ya uendeshaji

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 Madirisha then install Cygwin. Cygwin is a Linux layer on top of Windows that allows you to use Linux commands in Windows.

Kama kufunga Cygwin juu ya Windows kisha njia chaguo-msingi wakati wa kuanza wastaafu Cygwin itakuwa:

C:\cygwin64\home\{username}

 

Kujenga mpya notepad faili mfano

touch textfile.txt

 

Mabadiliko directory

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

 

Kuonyesha eneo la sasa (print working directory)

pwd

 

Dondoo mwisho 100 Maneno ya faili

tail -100 {filename.extension}

 

Dondoo kwanza 100 safu ya faili

head -100 {filename.extension}

 

Nakala ya faili

cp {source} {destination}

 

Hoja ya faili

mv {source} {destination}

 

Kufanya saraka mpya

mkdir {new directory name}

 

Kufuta faili

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}

 

Aina yaliyomo ya faili

sort {filename to sort}

 

Ondoa duplicate entries katika faili

uniq {filename to remove duplicates}

 

Compress files

gzip {filename}

 

Kubana directory

gzip -r {directory name}

 

Hesabu idadi ya safu na maneno katika faili maandishi

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

 

Onyesha maudhui ya faili maandishi

cat

 

sed stream editor (similar to find and replace)

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

 

Mabadiliko ya faili na directory ruhusa

chmod {options} {permissions} {filename}

 

Orodha ya amri ya hivi karibuni kutumika

history

 

Moja kwa moja ratiba ya kazi

cron
crontab

 

Ruhusa mabadiliko ya faili

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

 

Mabadiliko ya ruhusa ya faili kujirudia

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

 

 

Kuondoka na Jibu