Debaz Linux Kòmand sou Linux ak fenèt sistèm operasyon

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.

Si ou enstale Cygwin sou Windows Lè sa a, chemen an default lè ou kòmanse tèminal la Cygwin yo pral:

C:\cygwin64\home\{username}

 

Kreye nouvo egzanp dosye Notepad

touch textfile.txt

 

Chanjman anyè

cd {directory path\name}

 

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

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

 

Montre kote aktyèl (print working directory)

pwd

 

Èkstre dènye 100 Mo nan yon dosye

tail -100 {filename.extension}

 

Èkstre premye 100 ranje nan yon dosye

head -100 {filename.extension}

 

Kopi yon dosye

cp {source} {destination}

 

Deplase yon dosye

mv {source} {destination}

 

Fè yon nouvo anyè

mkdir {new directory name}

 

Efase dosye

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}

 

Triye sa ki nan yon dosye

sort {filename to sort}

 

Retire antre kopi nan yon dosye

uniq {filename to remove duplicates}

 

Konpresyon dosye

gzip {filename}

 

Konpresyon anyè

gzip -r {directory name}

 

Konte kantite ranje ak mo nan yon dosye tèks

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

 

Ekspozisyon kontni nan yon dosye tèks

cat

 

sed stream editor (similar to find and replace)

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

 

Chanje dosye ak anyè autorisations

chmod {options} {permissions} {filename}

 

Lis kòmandman ki sot pase itilize

history

 

Otomatikman pran travay

cron
crontab

 

Autorisations Chanjman dosye

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

 

Chanje autorisations dosye repetitif

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

 

 

Kite yon Reply