Show Menu
Cheatography

Linux Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Linux files system

/
root directory of the entire file system
/bin/
Essential user command binaries
/boot/
static files of the boot loader
/dev/
device files
/etc/
host-s­pecific system config­uration
/home/
user home direct­ories
/lib/
essential shared libraries and kernel modules
/media/
mount point for removable media such as USB
/mnt/
mount point for a tempor­arily mounted files sy­stems
/opt/
optional commercial software
/sbin/
system binaries
/usr/
user utilities and applic­ations
/root/
home directory for the root user
these are not all the file system direct­ories ,but they're the most important to know

Not that important command

cal (yearN­umber)
display the calendar for the proper year
date
display the current date
 

Navigating Between direct­ories

pwd
print working directory
cd ~
change directory to home
cd ..
go up one directory
cd /folde­r/f­loder
move to the wanted folder

operations on files and direct­ories

cp <fi­­le> <target dir>
copy file to a target directory
cp -i <fi­­le­1> <fi­le2>
Ask if to replace the new file with the old one
mv <fi­­le> <target dir>
move file to a target direct­ory,and can be used to rename files
rm <fi­­le>
remove file
rm -r <di­­r>
remove directory recurs­ively
rm -i
prompt for every removal
nano <fi­­le>
a terminal based text editor
mkdir <dir name>
makes new directory
you can also use "­rmdir -p (path)­" this command will delete all of the tree archaic unless the tree has files inside of it.
 

ls command

-a
מציג את כל הקבצים כולל המוסתרים בנתיב
-l
מציג את הקבצים בצורה מפורטת רושם הרשאות, גודל ועוד
-i
מציג את הקבצים והתקיות ואת כתובתם בזיכרון
-S
מציג את התיקיות לפי הגודל. מהקטן לגדול
-R
מבוצע בצורה ריקורסיבית לתוך התיקיות
*(Endwith)
מציג רק את הקבצים עם הסיומת
(start­With)*
מציג את התווים המתחילים עם
String
מציג את כל הקבצים שיש

Permis­sions numbers

0
no permis­sions
1
execute
2
write
3
write and execute
4
read
5
read and execute
6
read and write
7
read write and execute