mount /dev/hda2 /mnt/hda2 'hda2' '/mnt/hda2'. - '/mnt/hda2'
umount /dev/hda2 'hda2'. , '/mnt/hda2'
fuser -km /mnt/hda2 . , -
umount -n /mnt/hda2 /etc/mtab. " "
mount /dev/fd0 /mnt/floppy -
mount /dev/cdrom /mnt/cdrom CD DVD
mount /dev/hdc /mnt/cdrecorder CD-R/CD-RW DVD-R/DVD-RW(+-)
mount -o loop file.iso /mnt/cdrom ISO-
mount -t vfat /dev/hda5 /mnt/hda5 Windows FAT32
mount -t smbfs -o username=user,password=pass //winclient/share /mnt/share Windows (SMB/CIFS)
mount -o bind /home/user/prg /var/ftp/user "" (binding). 2.4.0. , , ftp ftp- "" (chroot), . /home/user/prg /var/ftp/user
:
shutdown -h now
init 0
telinit 0
shutdown -h hours:minutes &
shutdown -c
shutdown -r now
reboot
logout
cd ..
cd ../..
cd
cd ~user user
cd - ,
pwd
ls
ls -F ,
ls -l
ls -a
ls *[0-9]*
tree , (/)
lstree
mkdir dir1 'dir1'
mkdir dir1 dir2
mkdir -p /tmp/dir1/dir2
rm -f file1 'file1'
rmdir dir1 'dir1'
rm -rf dir1 'dir1'
rm -rf dir1 dir2
mv dir1 new_dir
cp file1 file2 file1 file2
cp dir/* . dir
cp -a /tmp/dir1 . dir1
cp -a dir1 dir2 dir1 dir2
ln -s file1 lnk1
ln file1 lnk1 "" ()
ls -
ls -al -
cd dir - dir
cd -
pwd -
mkdir dir - dir
rm file - file
rm -r dir - dir
rm -f file - file
rm -rf dir - dir *
cp file1 file2 - file1 file2
cp -r dir1 dir2 - dir1 dir2; dir2,
mv file1 file2 - file1 file2. file2 - file1 file2
ln -s file link - link file
touch file - file
cat > file - file
more file - file
head file - 10 file
tail file - 10 file
tail -f file - file , 10
ps -
top -
kill pid - id pid
killall proc - proc *
bg - ;
fg -
fg n - n
chmod octal file - file octal, , :
* 4 - (r)
* 2 - (w)
* 1 - (x)
:
chmod 777 - , ,
chmod 755 - rwx , rx .
grep pattern files - pattern files
grep -r pattern dir - pattern dir
command | grep pattern - pattern command
locate file - file
date -
cal -
uptime -
w -
whoami - ,
finger user - user
uname -a -
cat /proc/cpuinfo -
cat /proc/meminfo -
man command - command
df - .
du - ""
free - swap
whereis app - app
which app - app
tar cf file.tar files - tar- file.tar files
tar xf file.tar - file.tar
tar czf file.tar.gz files - tar Gzip
tar xzf file.tar.gz - tar Gzip
tar cjf file.tar.bz2 - tar Bzip2
tar xjf file.tar.bz2 - tar Bzip2
gzip file - file file.gz
gzip -d file.gz - file.gz file
ping host - host
whois domain - whois domain
dig domain - DNS domain
dig -x host - host
wget file - file
wget -c file -
:
./configure
make
make install
dpkg -i pkg.deb - (Debian)
rpm -Uvh pkg.rpm - (RPM)
Ctrl+C -
Ctrl+Z - , fg bg
Ctrl+D - , , exit
Ctrl+W -
Ctrl+U -
!! -
exit -
jobs - , .
kill [ ] [ PID ] - . .
killall [ ] - , .
links - web- Links.
Is [ ] - . , ls -la (ls -la) (w - Write, r - Read, x - Execute).
pwd - .
mkdir [ ] [ ] - . : mkdir /Desktop/__
uname -a - .
arch
uname -r
cat /proc/partitions ,
grep MemTotal /proc/meminfo ,
grep model name /proc/cpuinfo () (CPU)
head -n1 /etc/issue ( )
mount | column -t ( )
dmidecode -q | less SMBIOS/DMI
smartctl -A /dev/sda | grep Power_On_Hours () ()
hdparm -i /dev/sda sda
hdparm -tT /dev/sda sda
badblocks -s /dev/sda sda
dmidecode -q - (SMBIOS / DMI)
hdparm -i /dev/hda
hdparm -tT /dev/sda
cat /proc/cpuinfo
cat /proc/interrupts
cat /proc/meminfo
cat /proc/swaps ()
cat /proc/version
cat /proc/net/dev
cat /proc/mounts
lspci -tv PCI
lsusb -tv USB
date
cal 2007 - 2007-
date 041217002007.00 . (.)
clock -w BIOS
badblocks -v /dev/hda1 hda1 bad-
fsck /dev/hda1 / linux- hda1
fsck.ext2 /dev/hda1 / ext2 hda1
e2fsck /dev/hda1
e2fsck -j /dev/hda1 / ext3 hda1 ,
fsck.ext3 /dev/hda1 / ext3 hda1
fsck.vfat /dev/hda1 / fat hda11
fsck.msdos /dev/hda1
dosfsck /dev/hda1
APT - (Debian, Ubuntu )
apt-get install package_name /
apt-cdrom install package_name / cdrom'
apt-get update
apt-get upgrade ,
apt-get remove package_name ,
apt-get purge package_name ,
apt-get check
apt-get clean
apt-get autoclean
bunzip2 file1.bz2 'file1.gz'
gunzip file1.gz
gzip file1 'file1'
bzip2 file1
gzip -9 file1 file1
rar a file1.rar test_file rar- 'file1.rar' test_file
rar a file1.rar file1 file2 dir1 rar- 'file1.rar' file1, file2 dir1
rar x file1.rar rar-
unrar x file1.rar
tar -cvf archive.tar file1 tar- archive.tar, file1
tar -cvf archive.tar file1 file2 dir1 tar- archive.tar, file1, file2 dir1
tar -tf archive.tar
tar -xvf archive.tar
tar -xvf archive.tar -C /tmp /tmp
tar -cvfj archive.tar.bz2 dir1 bzip2(.. -j *nix )
tar -xvfj archive.tar.bz2 (.. -j *nix )
tar -cvfz archive.tar.gz dir1 gzip
tar -xvfz archive.tar.gz
zip file1.zip file1 zip-
zip -r file1.zip file1 file2 dir1 zip- /
unzip file1.zip zip-
RPM (Fedora, Red Hat )
rpm -ivh package.rpm -
rpm -ivh --nodeps package.rpm -
rpm -U package.rpm , ,
rpm -F package.rpm
rpm -e package_name.rpm
rpm -qa ,
rpm -qa | grep httpd , , "httpd"
rpm -qi package_name
rpm -qg "System Environment/Daemons"
rpm -ql package_name ,
rpm -qc package_name ,
rpm -q package_name --whatrequires ,
rpm -q package_name --whatprovides show capability provided by a rpm package
rpm -q package_name --scripts , /
rpm -q package_name --changelog
rpm -qf /etc/httpd/conf/httpd.conf . .
rpm -qp package.rpm -l , ,
rpm --import /media/cdrom/RPM-GPG-KEY
rpm --checksig package.rpm
rpm -qa gpg-pubkey
rpm -V package_name , , , , , MD5-
rpm -Va . !
rpm -Vp package.rpm ,
rpm2cpio package.rpm | cpio --extract --make-directories *bin* bin
rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm ,
rpmbuild --rebuild package_name.src.rpm
groupadd group_name group_name
groupdel group_name group_name
groupmod -n new_group_name old_group_name old_group_name new_group_name
useradd -c "Nome Cognome" -g admin -d /home/user1 -s /bin/bash user1 user1, /home/user1, shell' /bin/bash, admin Nome Cognome
useradd user1 user1
userdel -r user1 user1
usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1
passwd
passwd user1 user1 ( root)
chage -E 2005-12-31 user1 user1
pwck . /etc/passwd /etc/shadow
grpck . /etc/group
newgrp [-] group_name . "-", , . , /etc/passwd