As We know Linux Plays an Very Important Role in The feild of hacking and Linux Means CLI Command Linux interface and for that we have to learn Every Commands Individually So Today i am Going To Teach You Some Basic and Then We Will move to Advance commands !
Basic Terminal Shortcuts
==================
CTRL L = Clear the terminal cat
CTRL D = Logout (less, more)
CTRL E = Cursor the end of line
CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left
CTRL Y = Paste (after CTRL U,K or W)
TAB = auto completion of file or command
CTRL R = reverse search history
!! = repeat last command
CTRL Z = stops the current command (resume with fg in foreground or bg in background)
Basic Terminal Navigation
=================
ls -a = list all files and folders
ls <folderName> = list files in folder
ls -lh = Detailed list, Human readable
ls -l *.jpg = list jpeg files only
ls -lh <fileName> = Result for file only
cd <folderName> = change directory
if folder name has spaces use “ “
cd / = go to root
cd .. = go up one folder, tip: ../../../
du -h: Disk usage of folders, human readable
du -ah: “
“
“ files & folders, Human readable
du -sh: only show disc usage of folders
Pwd : Print Current Working Directory
man <command> : Print Manuals for The Command
Some Usefull Commands
================
Logging In and Managing Sessions ================================ *How do I change my password? passwd *How do I log out of the system? exit *How do I shut down my computer? halt *How do I reboot my computer? reboot *How do I get into the graphical interface? startx How do I gain superuser privileges without logging out? su -l (You will be prompted for the root password.)
How do I display or print a calendar? cal o Displaying the calendar for year 1492 AD: cal 1492 o Displaying the calendar for July, 1776 AD: cal 7 1776 How do I see the current system date and time? date How do I get information on other users? w How do I find out what a basic shell command does, say I want help with cd? cd --help How do I find out my user and group names and IDs? whoami How do I get a one-line help on a command, say grep? whatis grep How do I get information about GNU utilities, like id? info id How do I learn what a command can do, like jobs? man jobs How do I find out my current directory? pwd How do I find out information about my Linux? uname -a (The -a is an option: it tells uname to output All the information.) How do I find out how long my system is up? uptime
Finding and Killing Processes
Finding and Killing Processes ============================= *How do I view a list of running processes? ps -A (-A means all processes run by All users.) *How do I terminate a process, say with PID 5076? kill -9 5076 (Use the ps command to find out the PID of a process.) (9 is the 'sure kill' signal.) How do I know how much RAM is unused? free -m (-m outputs data in terms of megabytes) I suggest you look up man pages for: ps: man ps kill: man kill jobs: man jobs top: man top
Other Commands
=================
addpart |
blockdev |
delpart |
elvtune |
fdformat |
fsck |
fsck.cramfs |
fsck.minix |
isosize |
mkfs |
mkfs.bfs |
mkfs.cramfs |
mkfs.minix |
mkswap |
partx |
raw |
resizepart |
swaplabel |
cfdisk |
fdisk |
sfdisk |
chfn |
chsh |
last |
login |
newgrp |
su |
sulogin |
utmpdump |
vigr |
vipw |
blkid |
chkdupexe |
cal |
ddate |
findfs |
findmnt |
getopt |
kill |
logger |
look |
lsblk |
lslocks |
mcookie |
namei |
rename |
uuidd |
uuidgen |
whereis |
wipefs |
mount |
umount |
chrt |
ionice |
taskset |
arch |
chcpu |
ctrlaltdel |
cytune |
dmesg |
eject |
fallocate |
flock |
fsfreeze |
fstrim |
hwclock |
ipcmk |
ipcrm |
ipcs |
ldattach |
losetup |
lscpu |
mountpoint |
pivot_root |
prlimit |
readprofile |
renice |
rtcwake |
setarch |
setsid |
swapoff |
swapon |
switch_root |
tunelp |
unshare |
wdctl |
agetty |
mesg |
script |
scriptreplay |
setterm |
wall |
write |
col |
colcrt |
colrm |
column |
hexdump |
line |
more |
pg |
rev |
tailf |
ul |
Comments
Post a Comment