-
06-01-2011, 05:08 PM #1Super Commando Dhruv


- Join Date
- Sep 2010
- Location
- Lucknow/Pune,India
- Posts
- 470
- Blog Entries
- 2
- Thanks
- 170
- Thanked 144 Times in 83 Posts
Useful Linux commands when u have a shell
(Originally posted by eberly in orkut community)
cat ./../mainfile.php - Config file.
ls -la - Lists directory's.
ifconfig {eth0 etc} - Ipconfig equiv.
ps aux - Show running proccess's.
gcc in_file -o out_file - Compile c file.
cat /etc/passwd - List's accounts.
sudo - Superuser Do run a command as root provided you have perms
in /etc/sudoers.
id - Tells you what user your logged in as.
which wget curl w3m lynx - Check's to see what downloaders are
present.
uname -r - Shows all release info (or) cat /etc/release.
uname -a - Shows all kernal info (or) cat /etc/issue
last -30 - Last logged 30 ip's can change to desired number.
useradd - Create new user account.
usermod - Modify user account.
w - See who is currently logged on.
locate password.txt - Locates password.txt in current dur can use *.
rm -rf / - Please be carefull with this command, i cannot stress this
enough.
arp -a - Lists other machines are on the same subnet.
lsattr -va - ls file attributes on linux second extended file system
find / -type f -perm -04000 -ls - Finds suid files.
find . -type f -perm -04000 -ls - Finds suid files in current dir.
find / -type f -perm -02000 -ls - Finds all sgid files.
find / -perm -2 -ls - Finds all writable files and folders.
find . -perm -2 -ls - Finds all writable files and folders in current dir.
find / -type f -name .bash_history - Finds bash history.
netstat -an | grep -i listen - shows open ports.
cut -d: -f1,2,3 /etc/passwd | grep :: - From memory show user
with no pass.
find /etc/ -type f -perm -o+w 2> /dev/null - Write in /etc/passwd?.
cat /proc/version /proc/cpuinfo - Cpu info.
locate gcc- Finds gcc if installed.
set - Display system variables.
echo $path- Echo current path.
lsmod- Dumps kernal modules.
mount/df- Check mounted file system.
rpm -qa- Check patch level for RedHat 7.0.
dmesg- Check hardware ino.
cat /etc/syslog.conf - Log file.
uptime - Uptime check.
cat /proc/meminfo - Memory check.
find / -type f -perm -4 -print 2> /dev/null- Find readble files.
find / -type f -perm -2 -print 2> /dev/null - Find writable files.
chmod ### $folder - Chmod folder.
ls -l -b - Verbosly list directory's
Credits-maleficusIn the world of 0s and 1s, are you a zero or The One !
-
The Following User Says Thank You to abhaythehero For This Useful Post:
3thicalnoob (06-08-2012)
-
06-09-2011, 12:32 AM #2Garage Newcomer
- Join Date
- Jun 2011
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
linux commands
Here you can check out the most used linux commands .
-
05-29-2012, 12:21 AM #3Garage Newcomer
- Join Date
- May 2012
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
can you plzz upload a document on the commands and their functions
thanks in advance
**the commands must be usable in backtrack 5 r2
-
05-29-2012, 09:05 AM #4Garage Hyper Addict



- Join Date
- Jul 2010
- Location
- irc.freenode.net #g4h
- Posts
- 649
- Thanks
- 139
- Thanked 272 Times in 110 Posts
[*] To follow the path: look to the master, follow the master, walk with the master, see through the master,
------> become the master!!! <------
[*] Everyone has a will to WIN but very few have the will to prepare to WIN
[*] Invest yourself in everything you do, there's fun in being serious
-
05-29-2012, 02:38 PM #5Network Security Administrator
- Join Date
- Apr 2011
- Location
- /india/ap/hyd
- Posts
- 98
- Thanks
- 1
- Thanked 84 Times in 37 Posts
Get "Linux in a Nutshell" e-book.
"Free software" is a matter of liberty, not price. To understand the concept, you should think of "free" as in "free speech," not as in "free beer."
"Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer."
"Ubuntu - Linux For Human Beings."
Currently reading books:
CCIE Security v3.0, Configuration Practice Labs -- by Yusuf Bhaiji
Network Flow Analysis -- by Michael W. Lucas



1Likes
LinkBack URL
About LinkBacks



Reply With Quote

Poizon Web Exploiter 2.0
06-18-2013, 10:34 PM in Tools & Scripts