100% found this document useful (1 vote)
131 views18 pages

Linux Command List: System Information

The document provides a list of Linux commands organized into categories such as: system information commands, commands for shutting down/restarting systems, file and directory commands, file searching commands, mounting filesystems, managing disk space, users and groups, file permissions, special file attributes, and compressing/archiving files. Some example commands listed are ls, date, find, mkdir, chmod, tar, gzip, and unzip.

Uploaded by

Amarnath Kotha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
131 views18 pages

Linux Command List: System Information

The document provides a list of Linux commands organized into categories such as: system information commands, commands for shutting down/restarting systems, file and directory commands, file searching commands, mounting filesystems, managing disk space, users and groups, file permissions, special file attributes, and compressing/archiving files. Some example commands listed are ls, date, find, mkdir, chmod, tar, gzip, and unzip.

Uploaded by

Amarnath Kotha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 18

LinuxCommandList

Systeminformation

Command #arch #cal2007 #cat/proc/cpuinfo #cat/proc/interrupts #cat/proc/meminfo #cat/proc/swaps #cat/proc/version #cat/proc/net/dev #cat/proc/mounts #clockw #date #date041217002007.00 #dmidecodeq #hdparmi/dev/hda #hdparmtT/dev/sda #lspcitv #lsusbtv #unamem #unamer

Description showarchitectureofmachine(1) showthetimetableof2007 showinformationCPUinfo showinterrupts verifymemoryuse showfile(s)swap showversionofthekernel shownetworkadptersandstatistics showmountedfilesystem(s) savedatechangesonBIOS showsystemdate setdateandtime MonthDayhoursMinutesYear.Seconds showhardwaresystemcomponents(SMBIOS/ DMI) displaysthecharacteristicsofaharddisk performtestreadingonaharddisk displayPCIdevices showUSBdevices showarchitectureofmachine(2) showusedkernelversion

Shutdown,RestartandLogoutofasystem
Command #init0 #logout #reboot #shutdownhnow #shutdownh16:30& #shutdownc #shutdownrnow #telinit0 Description shutdownsystem(2) leavingsession reboot(2) shutdownsystem(1) plannedshutdownofthesystemat16:30 cancelaplannedshutdownofthesystem reboot(1) shutdownsystem(3)

FilesandDirectory
Command #cd/home #cd.. #cd../.. #cd #cd~user1 #cd #cpfile1file2 #cpdir/*. #cpa/tmp/dir1. #cpadir1dir2 #cpfilefile1 #iconvl #iconvffromEncodingttoEncoding inputFile>outputFile Description entertodirectory'/home' gobackonelevel gobacktwolevels gotohomedirectory gotohomedirectory gotopreviousdirectory copyingafile copyallfilesofadirectorywithinthecurrent workdirectory copyadirectorywithinthecurrentworkdirectory copyadirectory outputsthemimetypeofthefileastext listsknownencodings convertingthecodingofcharactersfromone formattoanother

#find.maxdepth1name*.jpgprintexec batchresizefilesinthecurrentdirectoryandsend convert themtoathumbnailsdirectory(requiresconvert fromImagemagick) #lnsfile1lnk1 #lnfile1lnk1 createasymboliclinktofileordirectory createaphysicallinktofileordirectory

#ls #lsF #lsl #lsa #ls*[09]* #lstree #mkdirdir1 #mkdirdir1dir2 #mkdirp/tmp/dir1/dir2 #mvdir1new_dir #pwd #rmffile1 #rmrfdir1 #rmrfdir1dir2 #rmdirdir1 #toucht0712250000file1 #tree

viewfilesofdirectory viewfilesofdirectory showdetailsoffilesanddirectory showhiddenfiles showfilesanddirectorycontainingnumbers showfilesanddirectoriesinatreestartingfrom root(2) createadirectorycalled'dir1' createtwodirectoriessimultaneously createadirectorytree rename/moveafileordirectory showthepathofworkdirectory deletefilecalled'file1' removeadirectorycalled'dir1'andcontents recursively removetwodirectoriesandtheircontents recursively deletedirectorycalled'dir1' modifytimestampofafileordirectory (YYMMDDhhmm) showfilesanddirectoriesinatreestartingfrom root(1)

Filesearch
Command #find/namefile1 #find/useruser1 #find/home/user1name\*.bin #find/usr/bintypefatime+100 #find/usr/bintypefmtime10 #find/name*.rpmexecchmod755'{}'\; #find/xdevname\*.rpm Description searchfileanddirectoryintorootfilesystemfrom '/' searchfilesanddirectoriesbelongingto'user1' searchfileswith'.bin'extensionwithindirectory'/ home/user1' searchbinaryfilesarenotusedinthelast100days searchfilescreatedorchangedwithin10days searchfileswith'.rpm'extensionandmodify permits searchfileswith'.rpm'extensionignoring removablepartitionsascdrom,pendrive,etc.

#locate\*.ps #whereishalt #whichhalt

findfileswiththe'.ps'extensionfirstrun 'updatedb'command showlocationofabinaryfile,sourceorman showfullpathtoabinary/executable

MountingaFilesystem
Command #fuserkm/mnt/hda2 #mount/dev/hda2/mnt/hda2 #mount/dev/fd0/mnt/floppy #mount/dev/cdrom/mnt/cdrom #mount/dev/hdc/mnt/cdrecorder #mount/dev/hdb/mnt/cdrecorder #mountoloopfile.iso/mnt/cdrom #mounttvfat/dev/hda5/mnt/hda5 #mount/dev/sda1/mnt/usbdisk #mounttsmbfso username=user,password=pass //WinClient/share/mnt/share #umount/dev/hda2 #umountn/mnt/hda2 Description forceumountwhenthedeviceisbusy mountdiskcalledhda2verifyexistenceofthe directory'/mnt/hda2' mountafloppydisk mountacdrom/dvdrom mountacdrw/dvdrom mountacdrw/dvdrom mountafileorisoimage mountaWindowsFAT32filesystem mountausbpendriveorflashdrive mountawindowsnetworkshare

unmountdiskcalledhda2exitfrommountpoint '/mnt/hda2'first runumountwithoutwritingthefile/etc/mtab usefulwhenthefileisreadonlyortheharddiskis full

DiskSpace
Command Description

#dfh #dpkgqueryWf='${InstalledSize;10}t$ {Package}n'|sortk1,1n #dushdir1 #dusk*|sortrn #lslSr|more #rpmqaqf'%10{SIZE}t%{NAME}n'| sortk1,1n

showlistofpartitionsmounted showtheusedspacebyinstalleddebpackages, sortingbysize(debian,ubuntuandalike) estimatespaceusedbydirectory'dir1' showsizeofthefilesanddirectoriessortedbysize showsizeofthefilesanddirectoriesorderedby size showtheusedspacebyrpmpackagesinstalled sortedbysize(fedora,redhatandalike)

UsersandGroups
Command #chageE20051231user1 #groupadd[group] #groupdel[group] #groupmodnmoonsun #grpck #newgrp[group] #passwd #passwduser1 #pwck #useraddc"UserLinux"gadmind /home/user1s/bin/bashuser1 #useradduser1 #userdelruser1 #usermodc"UserFTP"gsystemd /ftp/user1s/bin/nologinuser1 Description setdeadlineforuserpassword createanewgroup deleteagroup renameagroupfrommoontosun checkcorrectsyntaxandfileformatof'/etc/group' andgroupsexistence logintoanewgrouptochangedefaultgroupof newlycreatedfiles changepassword changeauserpassword(onlybyroot) checkcorrectsyntaxandfileformatof '/etc/passwd'andusersexistence createanewuser"user1"belongs"admin"group createanewuser deleteauser('r'eliminateshomedirectory) changeuserattributesasdescription,groupand other

PermitsonFiles
Command #chgrpgroup1file1 #chmodugo+rwxdirectory1 #chmodgorwxdirectory1 #chmodu+s/bin/file1 #chmodus/bin/file1 #chmodg+s/home/public #chmodgs/home/public #chmodo+t/home/public #chmodot/home/public #chownuser1file1 #chownRuser1directory1 #chownuser1:group1file1 #find/permu+s #lslh #ls/tmp|prT5W$COLUMNS Description changegroupoffiles setpermissionsreading(r),write(w)and(x) accesstousersowner(u)group(g)andothers(o) removepermitsreading(r),write(w)and(x) accesstousersgroup(g)andothers(or setSUIDbitonabinaryfiletheuserthat runningthatfilegetssameprivilegesasowner disableSUIDbitonabinaryfile setSGIDbitonadirectorysimilartoSUIDbut fordirectory disableSGIDbitonadirectory setSTIKYbitonadirectoryallowsfilesdeletion onlytolegitimateowners disableSTIKYbitonadirectory changeownerofafile changeuserownerofadirectoryandallthefiles anddirectoriescontainedinside changeuserandgroupownershipofafile viewallfilesonthesystemwithSUIDconfigured showpermitsonfiles divideterminalinto5columns

SpecialAttributesonfiles
Command #chattr+afile1 #chattr+cfile1 #chattr+dfile1 #chattr+ifile1 #chattr+sfile1 Description allowswriteopeningofafileonlyappendmode allowsthatafileiscompressed/decompressed automaticallybythekernel makessurethattheprogramignoresDumpthe filesduringbackup makesitanimmutablefile,whichcannotbe removed,altered,renamedorlinked allowsafiletobedeletedsafely

#chattr+Sfile1 #chattr+ufile1 #lsattr

makessurethatifafileismodifiedchangesare writteninsynchronousmodeaswithsync allowsyoutorecoverthecontentsofafileevenif itiscanceled showspecialsattributes

Archivesandcompressedfiles
Command #bunzip2file1.bz2 #bzip2file1 #gunzipfile1.gz #gzipfile1 #gzip9file1 #rarafile1.rartest_file #rarafile1.rarfile1file2dir1 #rarxfile1.rar #tarcvfarchive.tarfile1 #tarcvfarchive.tarfile1file2dir1 #tartfarchive.tar #tarxvfarchive.tar #tarxvfarchive.tarC/tmp #tarcvfjarchive.tar.bz2dir1 #tarxvfjarchive.tar.bz2 #tarcvfzarchive.tar.gzdir1 #tarxvfzarchive.tar.gz #unrarxfile1.rar #unzipfile1.zip #zipfile1.zipfile1 #ziprfile1.zipfile1file2dir1 Description decompressafilecalled'file1.bz2' compressafilecalled'file1' decompressafilecalled'file1.gz' compressafilecalled'file1' compresswithmaximumcompression createanarchiverarcalled'file1.rar' compress'file1','file2'and'dir1'simultaneously decompressrararchive createauncompressedtarball createanarchivecontaining'file1','file2'and'dir1' showcontentsofanarchive extractatarball extractatarballinto/tmp createatarballcompressedintobzip2 decompressacompressedtararchiveinbzip2 createatarballcompressedintogzip decompressacompressedtararchiveingzip decompressrararchive decompressaziparchive createanarchivecompressedinzip compressinzipseveralfilesanddirectories simultaneously

RPMPackages(Fedora,RedHatandlike)
Command #rpmivh[package.rpm] #rpmivhnodeeps[package.rpm] #rpmU[package.rpm] #rpmF[package.rpm] #rpme[package] #rpmqa #rpmqa|grephttpd #rpmqi[package] #rpmqg"SystemEnvironment/Daemons" #rpmql[package] #rpmqc[package] #rpmq[package]whatrequires #rpmq[package]whatprovides #rpmq[package]scripts #rpmq[package]changelog #rpmqf/etc/httpd/conf/httpd.conf #rpmqp[package.rpm]l #rpmimport/media/cdrom/RPMGPG KEY #rpmchecksig[package.rpm] #rpmqagpgpubkey #rpmV[package] #rpmVa #rpmVp[package.rpm] #rpmivh/usr/src/redhat/RPMS/`arch`/ [package.rpm] #rpm2cpio[package.rpm]|cpioextract makedirectories*bin* Description installarpmpackage installarpmpackageignoringdependencies requests upgradearpmpackagewithoutchanging configurationfiles upgradearpmpackageonlyifitisalready installed removearpmpackage showallrpmpackagesinstalledonthesystem showallrpmpackageswiththename"httpd" obtaininformationonaspecificpackageinstalled showrpmpackagesofagroupsoftware showlistoffilesprovidedbyarpmpackage installed showlistofconfigurationfilesprovidedbyarpm packageinstalled showlistofdependenciesrequiredforarpm packet showcapabilityprovidedbyarpmpackage showscriptsstartedduringinstallation/removal showhistoryofrevisionsofarpmpackage verifywhichrpmpackagebelongstoagivenfile showlistoffilesprovidedbyarpmpackagenot yetinstalled importpublickeydigitalsignature verifytheintegrityofarpmpackage verifyintegrityofallrpmpackagesinstalled checkfilesize,permissions,type,owner,group, MD5checksumandlastmodification checkallrpmpackagesinstalledonthesystem usewithcaution verifyarpmpackagenotyetinstalled installapackagebuiltfromarpmsource extractexecutablefilefromarpmpackage

#rpmbuildrebuild[package.src.rpm]

buildarpmpackagefromarpmsource

YUMpackagestool(Fedora,RedHatand alike)
Command #yumyinstall[package] #yumlocalinstall[package.rpm] #yumyupdate #yumupdate[package] #yumremove[package] #yumlist #yumsearch[package] #yumclean[package] #yumcleanheaders #yumcleanall Description downloadandinstallarpmpackage ThatwillinstallanRPM,andtrytoresolveallthe dependenciesforyouusingyourrepositories. updateallrpmpackagesinstalledonthesystem upgradearpmpackage removearpmpackage listallpackagesinstalledonthesystem findapackageonrpmrepository cleanuprpmcacheerasingdownloadedpackages removeallfilesheadersthatthesystemusesto resolvedependency removefromthecachepackagesandheadersfiles

DEBpackages(Debian,Ubuntuandlike)
Command #dpkgi[package.deb] #dpkgr[package] #dpkgl #dpkgl|grephttpd #dpkgs[package] #dpkgL[package] #dpkgcontents[package.deb] #dpkgS/bin/ping Description install/upgradeadebpackage removeadebpackagefromthesystem showalldebpackagesinstalledonthesystem showalldebpackageswiththename"httpd" obtaininformationonaspecificpackageinstalled onsystem showlistoffilesprovidedbyapackageinstalled onsystem showlistoffilesprovidedbyapackagenotyet installed verifywhichpackagebelongstoagivenfile

APTpackagestool(Debian,Ubuntuand alike)
Command #aptcachesearch[package] #aptcdrominstall[package] #aptgetinstall[package] #aptgetupdate #aptgetupgrade #aptgetremove[package] #aptgetcheck #aptgetclean Description returnslistofpackageswhichcorrespondsstring "searchedpackages" install/upgradeadebpackagefromcdrom install/upgradeadebpackage updatethepackagelist upgradealloftheinstalledpackages removeadebpackagefromsystem verifycorrectresolutionofdependencies cleanupcachefrompackagesdownloaded

Pacmanpackagestool(Arch,Frugalwareand alike)
Command #pacmanSname #pacmanRname Description Installpackage'name'withdependencies Deletepackage'name'andallfilesofit

Viewfilecontent
Command #catfile1 #head2file1 #lessfile1 Description viewthecontentsofafilestartingfromthefirst row viewfirsttwolinesofafile similarto'more'commandbutwhichallows backwardmovementinthefileaswellasforward movement viewcontentofafilealong

#morefile1

#tacfile1 #tail2file1 #tailf/var/log/messages

viewthecontentsofafilestartingfromthelast line viewlasttwolinesofafile viewinrealtimewhatisaddedtoafile

TextManipulation
Command #catexample.txt|awk'NR%2==1' #echoabc|awk'{print$1}' #echoabc|awk'{print$1,$3}' #catnfile1 #comm1file1file2 #comm2file1file2 #comm3file1file2 #difffile1file2 #grepAug/var/log/messages #grep^Aug/var/log/messages #grep[09]/var/log/messages #grepAugR/var/log/* #pastefile1file2 #pasted'+'file1file2 #sdifffile1file2 #sed's/string1/string2/g'example.txt #sed'/^$/d'example.txt #sed'/*#/d;/^$/d'example.txt #sede'1d'exampe.txt #sedn'/string1/p' #sede's/*$//'example.txt Description removeallevenlinesfromexample.txt viewthefirstcolumnofaline viewthefirstandthirdcolumnofaline numberrowofafile comparecontentsoftwofilesbydeletingonly uniquelinesfrom'file1' comparecontentsoftwofilesbydeletingonly uniquelinesfrom'file2' comparecontentsoftwofilesbydeletingonlythe linesthatappearonbothfiles finddifferencesbetweentwofiles lookupwords"Aug"onfile'/var/log/messages' lookupwordsthatbeginwith"Aug"onfile '/var/log/messages' selectfromfile'/var/log/messages'alllinesthat containnumbers searchstring"Aug"atdirectory'/var/log'and below mergingcontentsoftwofilesforcolumns mergingcontentsoftwofilesforcolumnswith'+' delimiteronthecenter finddifferencesbetweentwofilesandmerge interactivelyalike"diff" replace"string1"with"string2"inexample.txt removeallblanklinesfromexample.txt removecommentsandblanklinesfrom example.txt eliminatesthefirstlinefromfileexample.txt viewonlylinesthatcontaintheword"string1" removeemptycharactersattheendofeachrow

#sede's/string1//g'example.txt #sedn'1,5p'example.txt #sedn'5p;5q'example.txt #sede's/00*/0/g'example.txt #sortfile1file2 #sortfile1file2|uniq #sortfile1file2|uniqu #sortfile1file2|uniqd #echo'word'|tr'[:lower:]''[:upper:]'

removeonlytheword"string1"fromtextandleave intactall printfrom1thto5throwofexample.txt printrownumber5ofexample.txt replacemorezeroswithasinglezero sortcontentsoftwofiles sortcontentsoftwofilesomittinglinesrepeated sortcontentsoftwofilesbyviewingonlyunique line sortcontentsoftwofilesbyviewingonly duplicateline convertfromlowercaseinuppercase

CharactersetandFormatfileconversion
Command #dos2unixfiledos.txtfileunix.txt #recode..HTML<page.txt>page.html #recodel|more #unix2dosfileunix.txtfiledos.txt Description convertatextfileformatfromMSDOStoUNIX convertatextfiletohtml showallavailableformatsconversion convertatextfileformatfromUNIXtoMSDOS

FilesystemAnalysis
Command #badblocksv/dev/hda1 #dosfsck/dev/hda1 #e2fsck/dev/hda1 #e2fsckj/dev/hda1 #fsck/dev/hda1 #fsck.ext2/dev/hda1 Description checkbadblocksondiskhda1 repair/checkintegrityofdosfilesystemsondisk hda1 repair/checkintegrityofext2filesystemondisk hda1 repair/checkintegrityofext3filesystemondisk hda1 repair/checkintegrityoflinuxfilesystemondisk hda1 repair/checkintegrityofext2filesystemondisk hda1

#fsck.ext3/dev/hda1 #fsck.vfat/dev/hda1 #fsck.msdos/dev/hda1

repair/checkintegrityofext3filesystemondisk hda1 repair/checkintegrityoffatfilesystemondisk hda1 repair/checkintegrityofdosfilesystemondisk hda1

FormataFilesystem
Command #fdformatn/dev/fd0 #mke2fs/dev/hda1 #mke2fsj/dev/hda1 #mkfs/dev/hda1 #mkfstvfat32F/dev/hda1 #mkswap/dev/hda3 Description formatafloppydisk createafilesystemtypelinuxext2onhda1 partition createafilesystemtypelinuxext3(journal)on hda1partition createafilesystemtypelinuxonhda1partition createaFAT32filesystem createaswapfilesystem

FilesystemSWAP
Command #mkswap/dev/hda3 #swapon/dev/hda3 #swapon/dev/hda2/dev/hdb3 Description createaswapfilesystem activatinganewswappartition activatetwoswappartitions

Backup
Command #find/var/logname'*.log'|tarcvfiles from=|bzip2>log.tar.bz2 Description findallfileswith'.log'extentionandmakeanbzip archive

#find/home/user1name'*.txt'|xargscpav findandcopyallfileswith'.txt'extentionfroma targetdirectory=/home/backup/parents directorytoanother

#ddbs=1Mif=/dev/hda|gzip|ssh user@ip_addr'ddof=hda.gz' #ddif=/dev/sdaof=/tmp/file1

makeabackupofalocalharddiskonremotehost viassh backupcontentoftheharddrivetoafile

#ddif=/dev/hdaof=/dev/fd0bs=512count=1 makeacopyofMBR(MasterBootRecord)to floppy #ddif=/dev/fd0of=/dev/hdabs=512count=1 restoreMBRfrombackupcopysavedtofloppy #dump0ajf/tmp/home0.bak/home #dump1ajf/tmp/home0.bak/home #restoreif/tmp/home0.bak #rsyncrogpavdelete/home/tmp #rsyncrogpavesshdelete/home ip_address:/tmp #rsyncazesshdelete ip_addr:/home/public/home/local #rsyncazesshdelete/home/local ip_addr:/home/public #tarPufbackup.tar/home/user #(cd/tmp/local/&&tarc.)|sshC user@ip_addr'cd/home/share/&&tarxp' #(tarc/home)|sshCuser@ip_addr'cd /home/backuphome&&tarxp' #tarcf.|(cd/tmp/backup;tarxf) makeafullbackupofdirectory'/home' makeaincrementalbackupofdirectory'/home' restoringabackupinteractively synchronizationbetweendirectories rsyncviaSSHtunnel synchronizealocaldirectorywitharemote directoryviasshandcompression synchronizearemotedirectorywithalocal directoryviasshandcompression makeaincrementalbackupofdirectory '/home/user' copycontentofadirectoryonremotedirectoryvia ssh copyalocaldirectoryonremotedirectoryviassh localcopypreservingpermitsandlinksfroma directorytoanother

CDROM
Command #cdparanoiaB #cdparanoia #cdrecordvgracetime=2dev=/dev/cdrom ejectblank=fastforce #cdrecordvdev=/dev/cdromcd.iso #gzipdccd_iso.gz|cdrecord dev=/dev/cdrom #cdrecordscanbus #ddif=/dev/hdc|md5sum Description ripaudiotracksfromaCDtowavfiles ripfirstthreeaudiotracksfromaCDtowavfiles cleanarewritablecdrom burnanISOimage burnacompressedISOimage scanbustoidentifythechannelscsi performanmd5sumonadevice,likeaCD

#mkisofs/dev/cdrom>cd.iso #mkisofs/dev/cdrom|gzip>cd_iso.gz #mkisofsJallowleadingdotsRV #mountoloopcd.iso/mnt/iso

createanisoimageofcdromondisk createacompressedisoimageofcdromondisk createanisoimageofadirectory mountanISOimage

Networking(LAN/WiFi)
Command #dhclienteth0 #ethtooleth0 #hostwww.example.com #hostname #ifconfigeth0 #ifconfigeth0192.168.1.1netmask 255.255.255.0 #ifconfigeth0promisc #ifdowneth0 #ifupeth0 #iplinkshow #iwconfigeth1 #iwlistscan #miitooleth0 #netstattup #netstattupl #netstatrn #nslookupwww.example.com #routen #routeaddnet0/0gwIP_Gateway #routeaddnet192.168.0.0netmask 255.255.0.0gw192.168.1.1 #routedel0/0gwIP_gateway Description activeinterface'eth0'indhcpmode shownetworkstatisticsofeth0 lookuphostnametoresolvenametoipaddressand viceversa showhostnameofsystem showconfigurationofanethernetnetworkcard configureIPAddress configure'eth0'inpromiscuousmodetogather packets(sniffing) disableaninterface'eth0' activateaninterface'eth0' showlinkstatusofallnetworkinterfaces showwirelessnetworks wifiscanningtodisplaythewirelessconnections available showlinkstatusof'eth0' showallactivenetworkconnectionsandtheirPID showallnetworkserviceslisteningonthesystem andtheirPID showroutingtablealike"routen" lookuphostnametoresolvenametoipaddressand viceversa showroutingtable configuredefaultgateway configurestaticroutetoreachnetwork '192.168.0.0/16' removestaticroute

#echo"1">/proc/sys/net/ipv4/ip_forward #tcpdumptcpport80 #whoiswww.example.com

activateiproutingtemporarily showallHTTPtraffic lookuponWhoisdatabase

MicrosoftWindowsnetworks(samba)
Command #mounttsmbfso username=user,password=pass //WinClient/share/mnt/share #nbtscanip_addr #nmblookupAip_addr #smbclientLip_addr/hostname #smbgetRrsmb://ip_addr/share Description mountawindowsnetworkshare

netbiosnameresolution netbiosnameresolution showremotesharesofawindowshost likewgetcandownloadfilesfromahostwindows viasmb

IPTABLES(firewall)
Command #iptablestfilterL #iptablestnatL #iptablestfilterF #iptablestnatF #iptablestfilterX #iptablestfilterAINPUTptcpdport telnetjACCEPT Description showallchainsoffilteringtable showallchainsofnattable clearallrulesfromfilteringtable clearallrulesfromtablenat deleteanychainscreatedbyuser allowtelnetconnectionstoinput

#iptablestfilterAOUTPUTptcpdport blockHTTPconnectionstooutput httpjDROP #iptablestfilterAFORWARDptcp dportpop3jACCEPT #iptablestfilterAINPUTjLOGlog prefix allowPOP3connectionstoforwardchain Loggingoninputchain

#iptablestnatAPOSTROUTINGoeth0j configureaPAT(PortAddressTraslation)oneth0 MASQUERADE maskingoutboundpackets

#iptablestnatAPREROUTINGd redirectpacketsaddressedtoahosttoanotherhost 192.168.0.1ptcpmtcpdport22jDNAT todestination10.0.0.2:22

Monitoringanddebugging
Command #freem #kill9process_id #kill1process_id #lastreboot #lsmod #lsofpprocess_id #lsof/home/user1 #pseafw #pseopid,argsforest #pstree #smartctlA/dev/hda #smartctli/dev/hda #stracecls>/dev/null #stracefeopenls>/dev/null #tail/var/log/dmesg #tail/var/log/messages #top #watchn1'cat/proc/interrupts' Description displaysstatusofRAMinmegabytes forceclosureoftheprocessandfinishit forceaprocesstoreloadconfiguration showhistoryreboot displaykernelloaded displayalistoffilesopenedbyprocesses displaysalistofopenfilesinagivenpathsystem displayslinuxtasks displayslinuxtasksinahierarchicalmode Showsatreesystemprocesses monitoringreliabilityofaharddiskthrough SMART checkifSMARTisactiveonaharddisk displaysystemcallsmadeandreceivedbya process displaylibrarycalls showeventsinherenttotheprocessofbooting kernel showsystemevents displaylinuxtasksusingmostcpu displayinterruptsinrealtime

Othersusefulcommands
Command #aliashh='history' #apropos...keyword Description setanaliasforacommandhh=history displayalistofcommandsthatpertainto keywordsofaprogram,usefulwhenyouknow whatyourprogramdoes,butyoudon'tknowthe nameofthecommand changeshellcommand nicecommandtoknowifyouhavetoremoteinto anotherbox encryptafilewithGNUPrivacyGuard decryptafilewithGNUPrivacyGuard showsharedlibrariesrequiredbysshprogram displaytheonlinemanualpagesforexampleon pingcommanduse'k'optiontofindanyrelated commands createabootfloppy downloadanentirewebsite downloadafilewiththeabilitytostopthe downloadandresumelater

#chsh #chshlistshells #gpgcfile1 #gpgfile1.gpg #ldd/usr/bin/ssh #manping

#mkbootdiskdevice/dev/fd0`unamer` #wgetrwww.example.com #wgetcwww.example.com/file.iso

#echo'wgetcwww.example.com/files.iso'| startadownloadatanygiventime at09:00 #whatis...keyword #whoa displaysdescriptionofwhataprogramdoes showwhoisloggedon,andprint:timeoflast systemboot,deadprocesses,systemlogin processes,activeprocessesspawnedbyinit, currentrunlevel,lastsystemclockchange

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy