Está en la página 1de 7

Posts

Lomsdestacado

Enascenso

MiT!

Comunidades

Lomsreciente

T!Msica

Juegos

CrearPost!

Tops

INGRESAR

REGISTRARTE

VarioscomandosGNU/Linux(YanotanBsico)

fedeqwer

Buscar

19Seguidores
LINUXYGNU|HACE3HORAS

935Puntos
20Posts

Descubreunnuevomundo
taringa.net

netegratisaTaringa!yaccedeacontenidoexclusivo!

___Manipulacindetexto
catfile1file2..|command<>file1_in.txt_or_file1_out.txt:sintaxisgeneralparalamanipulacinde
textoutilizandoPIPE,STDINySTDOUT.

catfile1|command(sed,grep,awk,grep,etc)>result.txt:sintaxisgeneralparamanipularuntexto
deunficheroyescribirelresultadoenunficheronuevo.

catfile1|command(sed,grep,awk,grep,etc)result.txt:sintaxisgeneralparamanipularuntexto
deunficheroyaadirresultadoenunficheroexistente.

grepAug/var/log/messages:buscarpalabrasAugenelfichero/var/log/messages.
grep^Aug/var/log/messages:buscarpalabrasquecomienzanconAugenfichero
/var/log/messages

grep[09]/var/log/messages:seleccionartodaslaslneasdelfichero/var/log/messagesque
contienennmeros.

grepAugR/var/log/*:buscarlacadenaAugeneldirectorio/var/logydebajo.
seds/stringa1/stringa2/gexample.txt:reubicarstring1constring2enejemplo.txt
sed/^$/dexample.txt:eliminartodaslaslneasenblancodesdeelejemplo.txt
sed/*#/d/^$/dexample.txt:eliminarcomentariosylneasenblancodeejemplo.txt
echoesempio|tr[:lower

[:upper

:convertirminsculasenmaysculas.

sede1dresult.txt:eliminalaprimeralneadelficheroejemplo.txt
sedn/stringa1/p:visualizarsolamentelaslneasquecontienenlapalabrastring1.

___Establecercaracteryconversindeficheros

dos2unixfiledos.txtfileunix.txt:convertirunformatodeficherotextodesdeMSDOSaUNIX.
unix2dosfileunix.txtfiledos.txt:convertirunformatodeficherodetextodesdeUNIXaMSDOS.
recode..HTML<page.txt>page.html:convertirunficherodetextoenhtml.
recodel|more:mostrartodaslasconversionesdeformatodisponibles.

___Anlisisdelsistemadeficheros

badblocksv/dev/hda1:Chequearlosbloquesdefectuososeneldiscohda1.
fsck/dev/hda1:reparar/chequearlaintegridaddelficherodelsistemaLinuxeneldiscohda1.
fsck.ext2/dev/hda1:reparar/chequearlaintegridaddelficherodelsistemaext2eneldiscohda1.
e2fsck/dev/hda1:reparar/chequearlaintegridaddelficherodelsistemaext2eneldiscohda1.

Regular

e2fsckj/dev/hda1:reparar/chequearlaintegridaddelficherodelsistemaext3eneldiscohda1.
fsck.ext3/dev/hda1:reparar/chequearlaintegridaddelficherodelsistemaext3eneldiscohda1.
fsck.vfat/dev/hda1:reparar/chequearlaintegridaddelficherosistemafateneldiscohda1.

fsck.msdos/dev/hda1:reparar/chequearlaintegridaddeunficherodelsistemadoseneldisco
hda1.

dosfsck/dev/hda1:reparar/chequearlaintegridaddeunficherodelsistemadoseneldiscohda1.

___Formatearunsistemadeficheros

mkfs/dev/hda1:crearunficherodesistematipoLinuxenlaparticinhda1.
mke2fs/dev/hda1:crearunficherodesistematipoLinuxext2enhda1.
mke2fsj/dev/hda1:crearunficherodesistematipoLinuxext3(peridico)enlaparticinhda1.
mkfstvfat32F/dev/hda1:crearunficherodesistemaFAT32enhda1.
fdformatn/dev/fd0:formatearundiscoflooply.
mkswap/dev/hda3:crearunficherodesistemaswap.

___TrabajoconlaSWAP
mkswap/dev/hda3:crearficherodesistemaswap.
swapon/dev/hda3:activandounanuevaparticinswap.
swapon/dev/hda2/dev/hdb3:activardosparticionesswap.

___Respaldos(Backup)

dump0ajf/tmp/home0.bak/home:hacerunasalvacompletadeldirectorio/home.
dump1ajf/tmp/home0.bak/home:hacerunasalvaincrementaldeldirectorio/home.
restoreif/tmp/home0.bak:restaurandounasalvainteractivamente.
rsyncrogpavdelete/home/tmp:sincronizacinentredirectorios.
rsyncrogpavesshdelete/homeip_address:/tmp:rsyncatravsdeltnelSSH.

rsyncazesshdeleteip_addr:/home/public/home/local:sincronizarundirectoriolocalconun
directorioremotoatravsdesshydecompresin.

rsyncazesshdelete/home/localip_addr:/home/public:sincronizarundirectorioremotoconun
directoriolocalatravsdesshydecompresin.

ddbs=1Mif=/dev/hda|gzip|sshuser@ip_addrddof=hda.gz:hacerunasalvadeundiscoduroen
unhostremotoatravsdessh.

ddif=/dev/sdaof=/tmp/file1:salvarelcontenidodeundiscoduroaunfichero.(Enestecasoeldisco
duroessdayelficherofile1).

tarPufbackup.tar/home/user:hacerunasalvaincrementaldeldirectorio/home/user.
(cd/tmp/local/&&tarc.)|sshCuser@ip_addrcd/home/share/&&tarxp:copiarelcontenidode
undirectorioenundirectorioremotoatravsdessh.

(tarc/home)|sshCuser@ip_addrcd/home/backuphome&&tarxp:copiarundirectoriolocal
enundirectorioremotoatravsdessh.

tarcf.|(cd/tmp/backuptarxf):copialocalconservandolaslicenciasyenlacesdesdeun
directorioaotro.

find/home/user1name*.txt|xargscpavtargetdirectory=/home/backup/parents:encontrary
copiartodoslosficherosconextensin.txtdeundirectorioaotro.

find/var/logname*.log|tarcvfilesfrom=|bzip2>log.tar.bz2:encontrartodoslosficheroscon
extensin.logyhacerunarchivobzip.

ddif=/dev/hdaof=/dev/fd0bs=512count=1:hacerunacopiadelMRB(MasterBootRecord)aundisco
floppy.

ddif=/dev/fd0of=/dev/hdabs=512count=1:restaurarlacopiadelMBR(MasterBootRecord)salvada
enunfloppy.

___CDROM

cdrecordvgracetime=2dev=/dev/cdromejectblank=fastforce:limpiaroborraruncdregrabable.
mkisofs/dev/cdrom>cd.iso:crearunaimagenisodecdromendisco.
mkisofs/dev/cdrom|gzip>cd_iso.gz:crearunaimagencomprimidaisodecdromendisco.

mkisofsJallowleadingdotsRVLabelCDisolevel4o./cd.isodata_cd:crearunaimageniso
deundirectorio.

cdrecordvdev=/dev/cdromcd.iso:quemarunaimageniso.
gzipdccd_iso.gz|cdrecorddev=/dev/cdrom:quemarunaimagenisocomprimida.

mountoloopcd.iso/mnt/iso:montarunaimageniso.
cdparanoiaB:llevarcancionesdeuncdaficheroswav.
cdparanoia3:llevarlas3primerascancionesdeuncdaficheroswav.
cdrecordscanbus:escanearbusparaidentificarelcanalscsi.
ddif=/dev/hdc|md5sum:hacerfuncionarunmd5sumenundispositivo,comounCD.

___TrabajoconlaRED(LANyWiFi)

ifconfigeth0:mostrarlaconfiguracindeunatarjetaderedEthernet.

routedel0/0gwIP_gateway:eliminarlarutaesttica.

iplinkshow:mostarelestadodeenlacedetodaslasinterfaces.

ifupeth0:activarunainterfaceeth0.
ifdowneth0:deshabilitarunainterfaceeth0.
ifconfigeth0192.168.1.1netmask255.255.255.0:configurarunadireccinIP.
ifconfigeth0promisc:configurareth0enmodocomnparaobtenerlospaquetes(sniffing).
dhclienteth0:activarlainterfaceeth0enmododhcp.
routen:mostrarmesaderecorrido.
routeaddnet0/0gwIP_Gateway:configurarentradapredeterminada.

routeaddnet192.168.0.0netmask255.255.0.0gw192.168.1.1:configurarrutaestticaparabuscarla
red192.168.0.0/16.
echo1>/proc/sys/net/ipv4/ip_forward:activarelrecorridoip.
hostname:mostrarelnombredelhostdelsistema.
hostwww.example.com:buscarelnombredelhostpararesolverelnombreaunadireccinip(1).

nslookupwww.example.com:buscarelnombredelhostpararesolverelnombreaunadireccimipy
viceversa(2).
miitooleth0:mostarelestadodeenlacedeeth0.
ethtooleth0:mostrarlasestadsticasdetarjetaderedeth0.
netstattup:mostrartodaslasconexionesderedactivasysusPID.
netstattupl:mostrartodoslosserviciosdeescuchaderedenelsistemaysusPID.
tcpdumptcpport80:mostrartodoeltrficoHTTP.
iwlistscan:mostrarlasredesinalmbricas.
iwconfigeth1:mostrarlaconfiguracindeunatarjetaderedinalmbrica.
whoiswww.example.com:buscarenbasededatosWhois.

___RedesdeMicrosoftWindows(SAMBA)
nbtscanip_addr:resolucindenombrederedbios.
nmblookupAip_addr:resolucindenombrederedbios.
smbclientLip_addr/hostname:mostraraccionesremotasdeunhostenwindows.

PostsRelacionados
LINUXYGNU

___TablasIP(CORTAFUEGOS)

iptablestfilterL:mostrartodaslascadenasdelatabladefiltro.
iptablestnatL:mostrartodaslascadenasdelatablanat.
iptablestfilterF:limpiartodaslasreglasdelatabladefiltro.

VarioscomandosGNU/Linux
(Bsico)

LINUXYGNU

Comandosbsicosdela
TerminaldeLinux

iptablestnatF:limpiartodaslasreglasdelatablanat.
iptablestfilterX:borrarcualquiercadenacreadaporelusuario.
iptablestfilterAINPUTptcpdporttelnetjACCEPT:permitirlasconexionestelnetparaentar.
iptablestfilterAOUTPUTptcpdporthttpjDROP:bloquearlasconexionesHTTPparasalir.

iptablestfilterAFORWARDptcpdportpop3jACCEPT:permitirlasconexionesPOPauna
cadenadelantera.

iptablestfilterAINPUTjLOGlogprefixDROPINPUT:registrandounacadenadeentrada.
iptablestnatAPOSTROUTINGoeth0jMASQUERADE:configurarunPAT(Puertodetraduccin
dedireccin)eneth0,ocultandolospaquetesdesalidaforzada.

iptablestnatAPREROUTINGd192.168.0.1ptcpmtcpdport22jDNATtodestination
10.0.0.2:22:redireccionarlospaquetesdiriguidosdeunhostaotro.

___Monitoreandoydepurando
top:mostrarlastareasdelinuxusandolamayoracpu.
pseafw:muestralastareasLinux.

LINUXYGNU

Comandosparaubuntu
[cualquierversion]

LINUXYGNU

BashHistoria.

pseopid,argsforest:muestralastareasLinuxenunmodojerrquico.
pstree:mostrarunrbolsistemadeprocesos.
kill9ID_Processo:forzarelcierredeunprocesoyterminarlo.
kill1ID_Processo:forzarunprocesopararecargarlaconfiguracin.
lsofp$$:mostrarunalistadeficherosabiertosporprocesos.
lsof/home/user1:muestraunalistadeficherosabiertosenuncaminodadodelsistema.
stracecls>/dev/null:mostrarlasllamadasdelsistemahechasyrecibidasporunproceso.
stracefeopenls>/dev/null:mostrarlasllamadasalabiblioteca.
watchn1cat/proc/interrupts:mostrarinterrupcionesentiemporeal.
lastreboot:mostrarhistorialdereinicio.
lsmod:mostrarelkernelcargado.
freem:muestraelestadodelaRAMenmegabytes.
smartctlA/dev/hda:monitorearlafiabilidaddeundiscoduroatravsdeSMART.
smartctli/dev/hda:chequearsiSMARTestactivadoenundiscoduro.
tail/var/log/dmesg:mostrareventosinherentesalprocesodecargadelkernel.
tail/var/log/messages:mostrarloseventosdelsistema.

___Otroscomandostiles
aproposkeyword:mostrarunalistadecomandosquepertenecenalaspalabrasclavesdeun
programasontilescuandotsabesquhacetuprograma,perodesconoceselnombredel
comando.

manping:mostrarlaspginasdelmanualonlineporejemplo,enuncomandoping,usarlaopcin
kparaencontrarcualquiercomandorelacionado.

whatiskeyword:muestraladescripcindeloquehaceelprograma.
mkbootdiskdevice/dev/fd0unamer:crearunfloppyboteable.
gpgcfile1:codificarunficheroconguardiadeseguridadGNU.
gpgfile1.gpg:decodificarunficheroconGuardiadeseguridadGNU.
wgetrwww.example.com:descargarunsitiowebcompleto.

wgetcwww.example.com/file.iso:descargarunficheroconlaposibilidaddepararladescargary
reanudarmstarde.

echowgetcwww.example.com/files.iso|at09:00:Comenzarunadescargaacualquierhora.En
estecasoempezaraalas9horas.

ldd/usr/bin/ssh:mostrarlasbibliotecascompartidasrequeridasporelprogramassh.
aliashh=history:colocarunaliasparauncommandohh=Historial.
chsh:cambiarelcomandoShell.
chshlistshells:esuncomandoadecuadoparasabersitienesquehacerremotoenotraterminal.

whoa:mostrarquienestregistrado,eimprimirhoradelltimosistemadeimportacin,procesos
muertos,procesosderegistrodesistema,procesosactivosproducidosporinit,funcionamientoactual
yltimoscambiosdelrelojdelsistema.

FINDELPOST
Primeraparte>Aqui<
Segundaparte>Aquihijo<
...Noolvidescomentarydejarpuntos....


Sinoentendistenada...puedesvolvera>T!
FuentesdeInformacin
Elcontenidodelpostesdemiautora,y/o,esunrecopilacindedistintasfuentes.

Tags
terminal comandos Linux bash

Compartir

Darpuntos

189Puntos

+10

Votos:24T!score:8/10

Seguir

LINUXYGNU

19

Afavoritos

LINUXYGNU

10trucos
Comandosparael
imprescindiblespara terminaldeLinux
laterminal

290

Favoritos

Visitas

LINUXYGNU

INFO

Varioscomandos
GNU/Linux
(Bsico++)

Terminal

1
Seguidores

10comentarios
@Golliat17hace4horas+1
graciasmaster!muytilvan5!!
@fedeqwerhace4horas
Asiloes,muchasgraciasporlospuntos!
@Calamardo_255hace4horas+1
Excelenterecopilacinafavs.
AdemsrecomiendoloscursosdeRIchardCouture,graciasaestecursomeinicieenelusodela
terminal.

link:http://www.youtube.com/watch?v=WiEY9FHI1Wg
@fedeqwerhace4horas
Excelente,habraquehacerunresumen...Graciasporlospuntos!!
@El_Morrahace4horas+1
Gracias
@fedeqwerhace4horas
At,porlospuntos...Saludos!
@Ijac85hace3horas
Varecoyfavoritos,nuncasesabecuandolopodrenecesitar

@Daniel03hace3horas
+10,Reco,sigoelpostytodoeso.
Graciasportuaporte.
@libredetemorhace3horas
muybuenorecienahoraentiendouqesonloscomandos,tendriaqueserloprimerquelemuestran
ausuariosnoob
@carr1979hace2horas
+10...aFavoritos...
UnodeCadamillondepost,sondeinteligenciacolectiva,esteunodeellos.Gracias!
@ramses_17hace1hora
Psateporlosmos,talvezteinteresealguno.
http://www.taringa.net/ramses_17/posts
@nabo_tiesohace1hora
DesdequesalioWindows7ymasconWindows8,estostiposdesistemasoperativossolopueden
gustarleaunnerd,yesonoseniega
@nabo_tiesohace1hora
Eltipicocomentarioparacrearforobardo,queestupido
@nabo_tiesohace1hora

Voscallatequesosbiennabo
@nabo_tiesohace1hora
CompartotucomentarioNabo_tiesoLinuxesparanerds
@ramses_17hace1hora
Muybuenarecopilacinseorardilla+10
@rusitoohace1hora
Yoaunsigodandoestascositas,lodeIptablemevaaservirparacuandovengaalgunescritoo
examen!

LINUXYGNU

LINUXYGNU

LINUXYGNU

LINUXYGNU

LINUXYGNU

LINUXYGNU

CloudServer?
Armatelovos
mismo!

5Secretosqueno
sabiasdeVLC
MediaPlayer

Windowstiene
Mejoraspectoque
Linux...

Cmomontarun
servidorwebcasero
(Linux/Windows)

5cosaspoco
conocidaspara
hacerconVLC

AnimandounTRex
enBlender

Buscar...

Iralcielo

Anunciar Ayuda Protocolo Desarrolladores Denuncias ReportAbuseDMCA Trminosycondiciones Privacidaddedatos Reportarbug


Versinanterior

También podría gustarte