LINUX
– Command Line
Uso del Terminale
18/03/2013 Spectrum [Digitare il nome dell'autore]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
Informazioni sul sistema Comando
Descrizione
# arch
mostra mo stra l'architettura l'architettur a della macchina(1) [man man]]
# cal 2007
visualizzare il calendario calendario dell'anno 2007 [man man]]
# cat /proc/cpuinfo
visualizzare informazion inform azionii sulla cpu
# cat /proc/interrupts /proc/interrupts
visualizzare gli interrupts
# cat /proc/meminfo
verificare la memoria memori a in uso
# cat /proc/swaps
visualizzare visuali zzare i filesystem(s) fil esystem(s) swap
# cat /proc/version /proc/versi on
visualizzare visuali zzare la versione version e del kernel
# cat /proc/net/dev /proc/net /dev
visualizzare visuali zzare gli adattori di rete [ man man]]
# cat /proc/mounts /proc/m ounts
visualizzare visuali zzare i filesystem(s) fil esystem(s) montati mo ntati
# clock -w
salvare definitavamente le modifiche modifi che della data sul BIOS [man man]]
# date
visualizzare visuali zzare la data di sistema sist ema
# date 041217002007.00 041217 002007.00
impostare data e ora MeseGiornoOreMinutiAnno.Secondi [man man]]
# dmidecode dmidecode -q
mostra componenti hardware di sistema sistema (SMBIOS/DMI) [man man]]
# hdparm -i /dev/hda
mostra mo stra le info e le caratteristiche di un hard-disk [man man]]
# hdparm -tT -tT /dev/sda /dev/sda
eseguire eseguire un test test di lettura lettura su un hard-disk [man man]]
# lspci -tv
visualizzare le periferiche pci
# lsusb -tv
visualizzare le periferiche usb
# uname -m
mostra l'architettura l'architettura della macchina(2) macchina(2) [man man]]
# uname -r
mostra la versione del kernel in uso
« Torna SU «
[man man]]
[man man]] [man man]] [man man]] [man man]]
[man man]]
[man man]]
[man man]] [man man]]
[man man]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
Arresto, Arresto, Riavvio e Logout di un sistema sistema Comando
Descrizione
# init 0
arresto del siste ma(2) [ man man]]
# lo go ut
abbondonare la sessi sess io ne [ ma n]
# reboot
riavvio riavvio del sistema(2) sistema(2 ) [ ma n]
# shutdown - h now
arresto del siste ma(1) [ man man]]
# shutdown - h 16: 16 :30 &
arresto programmato del sistema [ man an]]
# shutdown -c
cancella cancellare re un arresto p rogrammato del de l sistema sis tema [ man an]]
# shutdown -r now
riavvio riavvio del sistema(1) sistema(1 ) [ ma n]
# telinit 0
arresto del siste ma(3) [ man man]]
« Torna SU «
Files e Directory Comando
Descrizione
# cd /home
entrare entrare nella ne lla d irectory rector y ' /home' [ man man]]
# cd ..
risalire risalire d i un livello [ man man]]
# cd ../..
risalire risalire d i d ue livelli [ man an]]
# cd
vai a lla hom homee d irectory [ man man]]
# cd ~user1 ~user1
vai a lla hom homee d irectory [ man man]]
# cd -
vai a lla d irectory p recedente [man man]]
# cp file1 file2
copi cop iare un file [ ma n]
# cp d ir/* .
copi cop iare tutti i file d i una d irector y dentro de ntro la directory di lavoro corrente [ ma n]
# cp -a /tmp/dir1 /tmp/dir1 .
copi cop iare una d irectory dentro de ntro la d irectory d i lavoro corre nte [ man an]]
# cp -a dir1 dir1 d ir2
copi cop iare una d irectory [ man man]]
# cp file file1
determina deter mina il mime type d i un file [ man man]]
# iconv -l
mo stra tutti i set d i caratteri carat teri conosciuti conosciut i [ man an]]
# iconv -f fromEncoding -t toEncoding inputFile > outputFile
convertire la codifica dei caratteri da un formato ad un'altro [ man an]]
# find . -maxdepth 1 -name *.jpg -print -exec modificare le dimensioni di tutti i file ".jpg"
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# ln file1 lnk1 lnk1
creare un link fisico a l file(o file(o d irecto irecto ry) ' file1' file1' chiamato lnk1 [ man man]]
# ls
visualizzare file d irecto irecto ry [ man an]]
# ls -F
distingure file file e d irectory [ ma n]
# ls -l
visualizzare i dettagli detta gli d i file e d irecto irecto ry [ man an]]
# ls -a
visualizzare file nascost nascostii [ man an]]
# ls *[0-9]*
visualizzare file e cartelle carte lle che contengono co ntengono numeri [ man an]]
# lstree
visualizza file file e d irectory in un a lbero be ro a parti part ire da root(2) [ ma n]
# mkdir kd ir d ir1
creare la d irectory rector y 'dir1' 'd ir1' [ man man]]
# mkdir kd ir d ir1 d ir2
creare d ue d irectory contemporaneamente co ntemporaneamente [ man an]]
# mkdir kd ir -p /tmp/dir1/d ir2
creare un'albero d i d irectory [ man an]]
# mv d ir1 new_dir
rinominare/muovere una d irecto irecto ry o file file [ man man]]
# pwd
visualizzare il path pa th della d irecto irecto ry d i lavoro [ man an]]
# rm -f file1
e liminare il file ' file1' [ man man]]
# rm -rf -r f d ir1
eliminare eliminare ricorsivamente la d irectory 'dir1' 'd ir1' e sul su l contenuto [ man man]]
# rm -rf -r f d ir1 d ir2
eliminare eliminare ricorsivamente d ue d irectory rector y ed il loro contenuto con un solo comando [ man man]]
# rmdir d ir1
eliminare eliminare la d irecto irecto ry 'di 'd ir1' [ man an]]
# touch -t 0712250000 file1 file1
modificare od ificare il timestamp d i un file o d irectory irectory (YYMMDDhhmm) [ man an]]
# tree
visualizza file file e d irectory in un a lbero be ro a parti part ire da root(1) [ ma n]
« Torna SU «
Ricerca Ricerca file f ile Comando
Descrizione
# find / - na me file1 file1
cercare un file file o d irectory rector y a ll'interno ll'inter no del de l filesystem partendo dalla radice '/' [ man an]]
# find / - user user1
cercare tutti i file e le d irectory appartenenti apparte nenti all'utente 'user1' [ man an]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# find /usr/bin -type f - mtime -10
cercare tutti i file creati creat i o modificati modificat i entro en tro 10 giorni [ man an]]
# find find / - na me *.rpm *.rp m -exec chmod 755 '{}' \; cercare tutti i file con estensi este nsio o ne 'rpm' 'rpm' e modificarne i permessi [ man man]] # find / - xdev de v -name \*.rpm
cercare tutti i file con co n estensi este nsio o ne rpm ignorando partizioni rimovi rimo vib b ili come co me cdrom, pen-drive, pen-d rive, [ ma n] ecc…
# lo cate \*.ps
cercare tutti i file con co n estensi este nsio o ne .ps - prima prima eseguire il comando 'updat ' updatedb' edb' [ ma n]
# whereis where is halt
visualizzare vis ualizzare la lo cazi ca zio o ne d i un file binario, binario,sorgente sorgente o man [ man man]]
# which halt
visualizzare il path pa th completo d i un file file binario binario /eseguibile /eseguib ile [ man man]]
« Torna SU «
Montar Mon taree un f ilesystem ilesystem Comando
Descrizione
# fuser -k m /mnt/h /mnt/ hda2
fo rzare umount q uando il device de vice è occu occ upato pa to [ man an]]
# mo unt /dev/h /dev/ hda2 /mnt/hda2 /mnt/ hda2
mo ntare il d isco hda2 - verificare verificare esistenza esisten za della de lla directory '/mnt/hda2' [ man an]]
# mo unt /dev/f /dev/ fd0 /mnt/floppy
mo ntare un floppy-d isk [ man an]]
# mo unt /dev/cdrom /dev/cdro m /mnt/cdrom /mnt/cdro m
mo ntare un cdrom/dvdr cdro m/dvdro o m [ man an]]
# mo unt /dev/h /dev/ hdc /mnt/cdrecorder /mnt/cdreco rder
mo ntare un cdrw/dvdrom [ man man]]
# mo unt /dev/h /dev/ hdb /mnt/cdrecorder /mnt/cdreco rder
mo ntare un cdrw/dvdrom [ man man]]
# mo unt -o loop file.iso file.iso /mnt/cdrom /mnt/cdro m
mo ntare un file ISO9660 o Immagine iso [ man an]]
# mo unt -t vfa vfa t /dev/hda5 /dev/ hda5 /mnt/hda5 /mnt /hda5
mo ntare un filesystem filesyste m windo windows ws F AT32 AT32 [ man an]]
# mo unt /dev/sda1 /mnt/usbdisk
mo ntare una pendrive pe ndrive usb usb o flash [ man man]]
# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share
montare una condivisione di rete windows [ man an]]
# um umo o unt /dev/hda2 /dev/ hda2
smontare il d isco hda2 - uscire dal da l mo unt poin po intt '/mnt/hda2' prima di sm s mo ntare [ man man]]
# um umo o unt -n /mnt/hda2
eseguire umount se nza nza scrivere sul file file /etc/mtab - utile quando il filesystem è in read-only o il disco è sat uro uro [ man man]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# df - h
visualizzare l'elenco delle partizioni part izioni mo ntate [ man an]]
# dpkg-query -W -f='${InstalledSize;10}t${Package}n' | sort -k1,1n
mo stra lo spazio d isco usato dai pacchetti deb installati, ordinandoli per dimensione (ubuntu, debi deb ia n and like) [ man man]]
# du -s h d ir1
conosc conosc ere lo spazio su d isco occ oc c upato dalla da lla directo directo ry 'd ir1' [ man an]]
# du -sk * | sort -rn
visualizzare la d imensione dei de i file e delle de lle directory ordinanti per dimensione [ man man]]
# ls -lSr |more
visualizzare la d imension imensio ne dei file e delle de lle directory ordinandoli per dimensione [ man man]]
# rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n
visualizzare la dimensione dei pacchetti rpm installati ordinanti per dimensione(fedora, redhat e derivate) [ man man]]
« Torna SU «
Users and Groups Comando
Descrizione
# chage -E 2005-12-3 2005- 12-31 1 user1 user1
impostare la scadenza p assword per un utente [ man an]]
# groupadd [group] [gro up]
creare un nuovo gruppo [ ma n]
# gro gro updel pde l [gro up]
eliminare eliminare un gruppo [ man man]]
# gro gro up mod -n moon sun
rinominare un gruppo [ ma n]
# grpck grpck
Verificare Verificare la correttezza sintatti sintatt ica e formal orma le del file '/etc/group' e l'effettiva esistenza dei gruppi [ man an]]
# newgrp - [group]
lo g-in tempo temporaneamente raneamente in un nuovo gruppo, gruppo, cambia soltanto il gruppo di default dei nuovi file creati [ man man]]
# passwd
modificare od ificare la password [ ma n]
# passwd user1 user1
modificare od ificare la password d i un uten utente(solo te(solo da root) [ man man]]
# pwck
Verificare Verificare la correttezza sintatti sintatt ica e formal orma le del file '/etc/passwd' e l'effettiva esistenza degli utenti [ man an]]
# use use radd -c "User Linux" -g - g admin ad min -d /home/user1 -s /bin/bash user1
creare un nuovo utente appartente al gruppo "admin" [man [ man]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
/ftp/user1 -s /bin/nologin user1 « Torna SU «
Permessi sui sui Files F iles Comando
Descrizione
# chgrp chgrp group1 file1 file1
modificare od ificare il gruppo d i appartenenza appa rtenenza d i un file file [ man an]]
# chmod ugo+rwx d irectory1 rector y1
impostare i permessi d i lettura(r), ett ura(r), scrittur scritt ura(w) a(w) ed accesso(x) per gli utenti proprietario(u), gruppo(g) e altri(o) [ man an]]
# chmod go-rwx d irecto irecto ry1
rimuo rimuo ve re i permessi pe rmessi d i le ttura(r), ttura(r), scrittura(w) ed accesso(x) per gli utenti gruppo(g) e altri(o [ man an]]
# chmod u+s /bin/file1
impostare il b it SUID su un file file b inar inar io - l' utente che esegue quel file ottienegli stessi privilegi del proprietario [ ma n]
# chmod u-s /bin/file1
disattivare il b it S UID su un file file b inario [ man man]]
# chmod g+s /home/public
impostare il b it SGID su una d irectory - simile a SUID ma impostato sulla directory [ man man]]
# chmod g-s /home/public /home/pub lic
disattivare il b it SGID SGI D su una d irectory [ man man]]
# chmod o+t /home/public
impostare il b it STIKY su una d irectory consente la cancellazione dei file solo ai legittimi proprietari [ man man]]
# chmod o-t /home/public
disattivare il b it STIKY STIK Y su una d irecto irecto ry [ man man]]
# chown chow n user1 file1
modificare od ificare il p ropri ropr ie tario d i un file [ ma n]
# chown -R user1 user1 d irectory1
modificare od ificare l'utente proprietar io d i una d irecto irecto ry e tutti i file e director y cont co ntee nuti al suo interno [ man an]]
# chown user1:gro user1:gro up1 file1 file1
modificare od ificare utente e gruppo gruppo propr ie tario tario d i un file file [ ]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# chattr + c file1
consente consen te c he un file venga compresso/decompresso dal kernel automaticamente [ man an]]
# chattr +d file1
fa in modo c he il p rogramma ro gramma Dump ignori ignor i il file dura dura nte un backup back up [ man an]]
# chattr + i file1
rende un file immutabile, immutab ile, o vvero non potrà po trà essere eliminato, alter a lteraa to, rino rino minato o linkato [ man an]]
# chattr +s file1 file1
conse conse nte ad un file file d i essere cancellato cancella to in maniera sicura, azzerandone i blocchi sul disco [ man an]]
# chattr +S file1
fa in modo c he se un file viene vie ne modificato od ificato i cambiamenti vengono scritti scritt i in maniera maniera sincro na sul disco disco come con sync [ ma n]
# chattr +u file1
permette d i recuperare il con co nte nuto nuto d i un file anc anc he se questo viene cance llato llato [ man man]]
# lsattr
visualizzare gli attribut att ributii speciali specia li [ man man]]
« Torna SU «
Archivi e file compressi Comando
Descrizione
# bunzip2 file1.b file1.bzz2
decom deco mprimere il file denominat deno minato o ' file1.b file1.bz2' z2' [ man an]]
# bzip2 file1 file1
com co mprimere il file file denominat de nominato o ' file1' file1' [ man an]]
# gunzip file1.g file1.gzz
decom deco mprimere il file denominat deno minato o ' file1. file1.gz gz'' [ man an]]
# gzip file1 file1
com co mprimere il file file denominat de nominato o ' file1' file1' [ man an]]
# gzip -9 file1 file1
com co mprimere con co n la massima compres co mpressio sio ne [ man an]]
# rar a file1. file1.rar rar test_fil test_ filee
creare un arc hivio rar chiamato chia mato ' file1.rar' file1.rar' [ man man]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
[ man an]] # tar -xvfj arc hive.tar.b hive.tar.bzz2
decom deco mprimere un archivio tar com co mp resso in bzip2 [ man an]]
# tar -cvfz archive.tar. gz d ir1
creare un arc hivio tar com co mpresso in gzip [ man man]]
# tar -xvfz archive.tar. gz
decom deco mprimere un archivio tar com co mp resso in gzip gzip [ ma n]
# unrar unrar x file1.rar file1.rar
decom deco mprimere un archivio rar [ man man]]
# unzip file1.zi file1. zip p
deco mprimere pr imere un archivio arc hivio zip zip [ man an]]
# zip file1.zip file1.zip file1
creare un arc hivio com co mpresso in zip [ man man]]
# zip -r file1.zip file1.zip file1 file1 file2 d ir1
zippare p iù file file e d irecto irecto ry con co ntemporanea me nte [ ma n]
« Torna SU «
Pacchetti RPM (Fedora, RedHat e derivate) Comando
Descrizione
# rpm - ivh [package.rp m]
installare un pacch pacc he tto rpm [ man man]]
# rpm - ivh --nodeeps -- nodeeps [package.rp m]
installare un pacchetto rpm igno igno rando le dipendenze richieste [ man man]]
# rpm -U [package.rp m]
aggiornare un p acchetto rpm senza modificarne i file di configurazione [ man man]]
# rpm -F [package.rpm]
aggiornare un p acchetto rpm sol so lo se q uest'ultimo uest'ultimo risulta già installato [ man an]]
# rpm -e [package]
rimuo rimuo ve re un pacchetto rpm [ man man]]
# rpm -qa
visualizzare tutti i pacchetti pacchett i rpm installati sul sistema [ man man]]
# rpm -qa | grep httpd
visualizzare tutti i pacchetti pacchett i rpm col co l nom nomee "httpd" [ man man]]
# rpm -q i [package]
ottenere info info rmazioni su un d eterminato
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# rpm -q [package] --scripts -- scripts
visualizzare gli script avviati avv iati in fa se d i installazione/rimozione [ man an]]
# rpm -q [package] --changelog -- changelog
visualizzare lo stori stor ico d elle revisi revis io ni d i un pacche pacche tto rpm [ man man]]
# rpm -qf /etc/httpd/conf/httpd.conf /etc/httpd/conf/ httpd.conf
verif verificare icare a q uale pacchetto rpm appartiene appa rtiene un dato file [man man]]
# rpm -qp [package.rpm] - l
visualizzare la lista dei de i file file forniti ornit i da un pacche pacche tto non ancora installato insta llato [ man man]]
# rpm --impo --import rt /media/cdro m/RPM-GPG/RPM-GP GKEY
importare la public-key della digital signature [ man an]]
# rpm -- checksig checksig [package.rp m]
verif verificare icare l'integrità d i un p acchetto rpm rp m [ man an]]
# rpm -qa gpg-pu gpg-p ubkey bke y
verif verificare icare l'integrità d i tutti pacc hetti ett i rpm rp m installati [ man man]]
# rpm -V [package]
verif verificare icare file size, permessi, tipo, o wner, group, MD5 checksum e ultima modifica [ man man]]
# rpm -Va
verif verificare icare tutti i pacch pacc hetti ett i rpm installati sul sistema - usare con cautela [ man an]]
# rpm -Vp [package.rp m]
verif verificare icare un pacc hetto rpm non a ncora installato [ ma n]
# rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm]
installare un pacchetto costruito da un rpm sorgente [ man an]]
# rpm2cpio [package.rpm] | cpio --extract -make-directories *bin*
estrarre gli eseguibili da un pacchetto rpm [ man an]]
# rpmbuild --rebuild -- rebuild [package.src.rpm]
costruire un pacch pacc he tto da un rpm sor gente gente [ man an]]
« Torna SU «
YUM package tool (Fedora, RedHat e derivate)
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# yum search [package]
cercare un pacchetto pac chetto rpm sul su l repos itory [ man man]]
# yum c lean [package]
ripulire la cache dai da i pacchetti pacchett i rpm scaricati scar icati [ man an]]
# yum c lean ea n headers
rimuovere rimuove re tutti tu tti i file headers c he il sistem siste ma usa per la risoluzione delle dipe ndenze [ man man]]
# yum clean all
rimuo rimuo ve re dalla da lla cache i pacchetti pacchett i e gli headers headers [ man an]]
« Torna SU «
Pacchetti DEB (Debian, ( Debian, Ubuntu Ubuntu e derivate) derivate) Comando
Descrizione
# dpkg - i [package.deb]
installare/aggiornare un pacchetto deb [ man man]]
# dpkg -r [package]
rimuo rimuo ve re un pacchetto deb dal da l sistema [ man man]]
# dpkg - l
visualizzare tutti i pacchetti pacchett i d eb insta installati llati sul su l sistema [ man man]]
# dpkg - l | grep httpd
visualizzare vis ualizzare tutti tutt i i pacchetti pacc hetti rpm rp m col co l nome "httpd" [ man man]]
# dpkg -s [package]
ottenere info info rmazioni su un d eterminato pacche pacche tto installat insta llato o [ man man]]
# dpkg -L [packa ge] ge]
visualizzare la lista dei de i file file forniti ornit i da un pacchetto installat insta llato o [ man man]]
# dpkg --cont -- contee nts [packa ge.deb] ge.deb]
visualizzare la lista dei file file forniti ornit i da un pacche pacche tto non insta llato llato [ man man]]
# dpkg -S /bin/ping /bin/p ing
verif verificare icare a q uale pacchetto pacch etto appartien appartie ne un dato da to file [m [ ma n]
« Torna SU «
APT packages tool (Debian, Ubuntu e derivate)
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# apt-get c heck
verif verifica ica la corretta risoluzione d elle d ipen pe ndenze de nze [ man an]]
# apt-get c lean
ripulire la cache dai da i pacchetti pacchett i scaricati [ man man]]
« Torna SU «
Pacman packages tool (Arch, Frugalware e derivate) Comando
Descrizione
# pacm pac ma n -S name
installa un pacc hetto risolv riso lvee ndo le d ipendenze pe ndenze [ man an]]
# pacm pac ma n -R name name
rimuo rimuo vi un pacch pacc he tto e tutti i file associati [ man an]]
« Torna SU «
Visualizzare isualizzare il contenuto contenut o di un u n file Comando
Descrizione
# cat file1 file1
visualizzare il contenuto co ntenuto d i un file file partendo pa rtendo dalla da lla prima prima r iga iga [ ma n]
# head -2 file1
visualizzare vis ualizzare le prime pr ime d ue righe d i un file [ man man]]
# less file1 file1
simile a l com co mando ' more' ma c he con co nsente d i scorrere il file sia in avanti che indietro [ man man]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# comm co mm -2 file1 file1 file2 file2
com co mparare i contenuti co ntenuti d i d ue file file sopprimendo soltanto le righe univoche del 'file2' [ man an]]
# comm co mm -3 file1 file1 file2 file2
com co mparare i contenuti co ntenuti d i d ue file file sopprimendo soltanto le righe che appa io no su entrambi en trambi i file [ man an]]
# diff file1 file2
trova le d iffere nze tra d ue files [ man man]]
# grep grep Aug /var/lo g/messages g/messages
cercare la parola "Aug" a ll'interno ll'inter no del de l file file 'messages' [ ma n]
# grep grep ^ Aug /var/log/m /var/log/ messa ges ges
cercare le parole c he cominciano co minciano con co n "Aug" all'interno del file file 'messages ' messages'' [ man an]]
# grep grep [0-9] /var/log/m /var/log/ messa ges
selezio selezio nare all'intern all' interno o del file file ' messages tutte le righe che contengono numeri [ man man]]
# grep grep Aug -R /var/log/* /var/ log/*
estendere la ricerca della string str ingaa "Aug" dentro de ntro la directory '/var/log' e sottodirectory [ man an]]
# paste file1 file1 file file 2
fo ndere de re il con co ntenuto d i d ue file per colonne co lonne [ man an]]
# paste -d '+' file1 file1 file2
fo ndere de re il con co ntenuto d i d ue file per colonne co lonne con co n il delimitatore '+' tra apici [ man man]]
# sdiff sd iff file1 file2
trova le d ifiere nze tra d ue files e li fo nde interrattivamente simile a "diff" [ man man]]
# sed 's/string1/str ing2 ing2 /g' e xa mp le.txt
rimp rimp iazzare la "stringa1" con co n la "stringa2 " da example.txt [ man] man]
# sed '/^$/d' example.txt
rimuo rimuo ve re tutte le righe vuote vuote da e xample.txt
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
line univo univo c he [ man man]] # sort file1 file1 file2 | uniq uniq -d
ordinare i con co ntenuti tenut i d i d ue file file stam sta mp a ndo solo le line duplicate [ man man]]
# echo ' word' | tr '[:lower:]' '[:lo wer:]' '[:upper :]'
convertire da lo wer case in upper pp er case [ man an]]
« Torna SU «
Conversione Set Caratteri e Formato dei file Comando
Descrizione
# dos2unix filedos.t filedos.txt xt fileu fileunix.txt nix.txt
convertire un file file d i testo MSDOS in formato UNIX [ man man]]
# recode ..HTML < page pa ge.. txt > page pa ge.. html
convertire un file file d i testo in formato html [ man an]]
# recode -l | more
visualizza tutti i format format i d i conversione co nversione disponibili [ man an]]
# unix2do unix2doss fileu fileunix.txt nix.txt filedos.txt
convertire un file file d i testo UNIX in formato MSDOS [ man an]]
« Torna SU «
Analisi Filesys F ilesystem tem Comando
Descrizione
# badbl badb locks -v /dev/hda1
verif verifica ica bad b lo cks sul su l d isco hda1 [ man an]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
Comando
Descrizione
# fd format -n /dev/fd0
fo rmattare un flopp floppy y d isk [ man man]]
# mk e2f e2 fs /dev/hda1
creare il file file system d i tipo linux ext2 ex t2 sulla partizione hda1 [ man man]]
# mk e2f e2 fs -j /dev/h /dev/ hda1
creare il file file system d i tipo linux ext3(Jour ex t3(Journal nal)) sulla partizione hda1 [ ma n]
# mk fs /de v/hda1 v/hda1
creare un file file system d i tipo linux sulla p artizione hda1 [ man man]]
# mk fs -t vfat vfat 32 -F /dev/hda1
creare un file file system d i tipo FAT32 [ man an]]
# mk swap /dev/hda3 /de v/hda3
creare una filesyste files ystem m d i tipo swap [ man an]]
« Torna SU «
Filesystem Filesystem SW SWAP AP Comando
Descrizione
# mk swap /dev/hda3 /de v/hda3
creare un filesystem files ystem d i tipo swap [ man man]]
# swapon /dev/hda3 /dev/ hda3
attivare una nuova partizione part izione d i swap [ ma n]
# swapon /dev/hda2 /dev/ hda2 /de v/hdb3 v/hdb3
attivare d ue partizioni part izioni d i swap [ man man]]
« Torna SU «
Backup
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
# rsync -rogpav --de -- dellete /home /tmp
sincronizzazione tra d irectory [ ma n]
# rsync -rogpav -e ssh --de -- dellete /hom / homee ip_address:/tmp
rsync via ssh tunnel [ man man]]
# rsync -az -e ssh --delete ip_addr:/home/public /home/local
sincronizzare una directory locale con una directo directo ry remota via ssh e compress io ne [ man an]]
# rsync -az -e ssh --delete /home/local ip_addr:/home/public
sincronizzare una directory remota con una directo directo ry locale via ssh ss h e compressione compres sione [ man man]]
# tar -Puf b ackup.t ack up.tar ar /home/user
backup incrementale della de lla d irecto irecto ry '/home/u '/home/ user' [ ma n]
# ( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr 'cd /home/share/ && tar x -p'
copi cop iare il conte nuto nuto di d i una directory su s u una directory remota via ssh [ man an]]
# ( tar c /hom / homee ) | ssh ss h -C user@ip_addr 'cd /ho /ho me/b me/b ackup-home ack up-home && tar x -p'
copiare una directory locale su una directory remota remota via v ia ssh [ ma n]
# tar cf - . | (cd /tmp/backup ; tar xf - )
copi cop iare in locale oca le preserv preser va ndo i p ermessi e link da una directory all'altra [ ma n]
« Torna SU «
CDROM Comando
Descrizione
# cd-paranoia -B
rippare le traccie tracc ie audi aud io da un cd in file file wav [ man an]]
# cd-paranoia --
rippare le prime tre traccie audi aud io da un cd in file file
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
Rete (LAN / WiFi) Comando
Descrizione
# dhclient eth0
active interface 'eth0' 'e th0' in d hcp mode [ man man]]
# ethtool eth0
mo stra statistiche scheda d i rete 'eth0' [ man man]]
# host www.e www.e xample.com xample.co m
risoluzione hostnam os tnamee in ip address ad dress e viceversa(1) [ man man]]
# hostname
mo stra l' hostname os tname del de l sistema [ man man]]
# ifconfig eth0
visualizza configurazio co nfigurazione ne d i una scheda d i rete ethernet [ man an]]
# ifconfig eth0 192.168.1.1 netmask 255.255.255.0
configura ip address [ man man]]
# ifconfig eth0 p romisc
configura 'eth0' 'e th0' in modalità promisc ua per raccogliere i pacchetti(sniffi pacchett i(sniffing) ng) [ man man]]
# ifdown
disattiva interfaccia 'eth0' [
h0
]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
« Torna SU «
Microsof Microsoftt Windows networks (samba) Comando
Descrizione
# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share
montare una condivisione di rete windows [ man an]]
# nbtscan ip_addr p_add r
risoluzione no me netbios [ man man]]
# nm nmb b lookup -A ip_addr p_add r
risoluzione no me netbios [ man man]]
# smbclient -L ip_addr/hos ip_addr/ hostna tna me
visualizza le con co nd ivisio ivisio ni remote d i un hos hostt windows [ man man]]
# smbget -Rr -R r smb://i smb:// ip_addr/share p_add r/share
simile a wget permette pe rmette d i scari scar icare file file da un host windows via smb [ man man]]
« Torna SU «
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
Monitoring di sistema e debugging Comando
Descrizione
# free - m
visualizza lo status della de lla ram in megabyte [ man an]]
# kill -9 process_ id
fo rzare la chiusura ch iusura del de l processo e terminarl ter minarlo o [ man an]]
# kill -1 process_ id
fo rzare il p rocesso a ricaricare la configura co nfigurazi zio o ne [ ma n]
# last reboot
mo stra lo storico stor ico dei de i reboot [ man man]]
# lsmod lsmod
visualizza i mooduli del de l ker nel c aricati [ man an]]
# lsof -p process_id
visualizza la lista lista dei de i file file aperti ape rti dai processi process i [ man an]]
# lsof /home/user1
visualizza la lista lista dei de i file file aperti ape rti in una determinato determinato path p ath di si s istem ste ma [ man an]]
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Comandi Linux
keywords di un dato applicativo, utile quando si ricorda cosa un programma fa, ma non si ricorda il nome nome del d el programm progra mmaa [ man man]] # chsh
cambiare shell d i lavoro [ man an]]
# chsh -- list-shells
questo com co mando mostra eventuali even tuali ute ute nti remoti lo ggati sul s ul siste ma [ man man]]
# gpg -c file1 file1
cryp cryp tare un file con co n GNU Privacy Guard [ man an]]
# gpg file1. file1.g gp g
decryptare un file file con co n GNU Privacy Privac y Guard [ man an]]
# ldd /usr/bin/ssh
mo stra le librer librer ie richieste per esempi esemp io dal da l programma ssh [ ma n]
# man p ing
visualizza un manuale per pe r otten otte nere informazioni sull'utilizzo per esempio del comando ping [ man an]]
# mkbootdisk kboo tdisk --devi -- device ce /de v/fd0 v/fd0 `uname -r`
creare un d ischetto d i boo boott [ man man]]