Autor ovih popisa komandi ne daje nikakvu garanciju za njih i koristite ih na svoju odgovornost!
Prvi dio Drugi dio
System information
|
| Command |
Description |
|
# arch |
show architecture of machine(1) [man] |
|
# cal 2007 |
show the timetable of 2007 [man] |
|
# cat /proc/cpuinfo |
show information CPU info [man] |
|
# cat /proc/interrupts |
show interrupts [man] |
|
# cat /proc/meminfo |
verify memory use [man] |
|
# cat /proc/swaps |
show file(s) swap [man] |
|
# cat /proc/version |
show version of the kernel [man] |
|
# cat /proc/net/dev |
show network adpters and statistics [man] |
|
# cat /proc/mounts |
show mounted file system(s) [man] |
|
# clock -w |
save date changes on BIOS [man] |
|
# date |
show system date [man] |
|
# date 041217002007.00 |
set date and time - MonthDayhoursMinutesYear.Seconds [man] |
|
# dmidecode -q |
show hardware system components - (SMBIOS / DMI) [man] |
|
# hdparm -i /dev/hda |
displays the characteristics of a hard-disk [man] |
|
# hdparm -tT /dev/sda |
perform test reading on a hard-disk [man] |
|
# lspci -tv |
display PCI devices [man] |
|
# lsusb -tv |
show USB devices [man] |
|
# uname -m |
show architecture of machine(2) [man] |
|
# uname -r |
show used kernel version [man] |
| |
|
Shutdown, Restart and Logout of a system
|
| Command |
Description |
|
# init 0 |
shutdown system(2) [man] |
|
# logout |
leaving session [man] |
|
# reboot |
reboot(2) [man] |
|
# shutdown -h now |
shutdown system(1) [man] |
|
# shutdown -h 16:30 & |
planned shutdown of the system at 16:30 [man] |
|
# shutdown -c |
cancel a planned shutdown of the system [man] |
|
# shutdown -r now |
reboot(1) [man] |
|
# telinit 0 |
shutdown system(3) [man] |
|
| |
|
Files and Directory
|
| Command |
Description |
|
# cd /home |
enter to directory '/ home' [man] |
|
# cd .. |
go back one level [man] |
|
# cd ../.. |
go back two levels [man] |
|
# cd |
go to home directory [man] |
|
# cd ~user1 |
go to home directory [man] |
|
# cd - |
go to previous directory [man] |
|
# cp file1 file2 |
copying a file [man] |
|
# cp dir/* . |
copy all files of a directory within the current work directory [man] |
|
# cp -a /tmp/dir1 . |
copy a directory within the current work directory [man] |
|
# cp -a dir1 dir2 |
copy a directory [man] |
|
# cp file file1 |
outputs the mime type of the file as text [man] |
|
# iconv -l |
lists known encodings [man] |
|
# iconv -f fromEncoding -t toEncoding inputFile > outputFile |
converting the coding of characters from one format to another [man] |
|
# find . -maxdepth 1 -name *.jpg -print -exec convert |
batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) [man] |
|
# ln -s file1 lnk1 |
create a symbolic link to file or directory [man] |
|
# ln file1 lnk1 |
create a physical link to file or directory [man] |
|
# ls |
view files of directory [man] |
|
# ls -F |
view files of directory [man] |
|
# ls -l |
show details of files and directory [man] |
|
# ls -a |
show hidden files [man] |
|
# ls *[0-9]* |
show files and directory containing numbers [man] |
|
# lstree |
show files and directories in a tree starting from root(2) [man] |
|
# mkdir dir1 |
create a directory called 'dir1' [man] |
|
# mkdir dir1 dir2 |
create two directories simultaneously [man] |
|
# mkdir -p /tmp/dir1/dir2 |
create a directory tree [man] |
|
# mv dir1 new_dir |
rename / move a file or directory [man] |
|
# pwd |
show the path of work directory [man] |
|
# rm -f file1 |
delete file called 'file1' [man] |
|
# rm -rf dir1 |
remove a directory called 'dir1' and contents recursively [man] |
|
# rm -rf dir1 dir2 |
remove two directories and their contents recursively [man] |
|
# rmdir dir1 |
delete directory called 'dir1' [man] |
|
# touch -t 0712250000 file1 |
modify timestamp of a file or directory - (YYMMDDhhmm) [man] |
|
# tree |
show files and directories in a tree starting from root(1) [man] |
|
| |
|
File search
|
| Command |
Description |
|
# find / -name file1 |
search file and directory into root filesystem from '/' [man] |
|
# find / -user user1 |
search files and directories belonging to 'user1' [man] |
|
# find /home/user1 -name \*.bin |
search files with '. bin' extension within directory '/ home/user1' [man] |
|
# find /usr/bin -type f -atime +100 |
search binary files are not used in the last 100 days [man] |
|
# find /usr/bin -type f -mtime -10 |
search files created or changed within 10 days [man] |
|
# find / -name *.rpm -exec chmod 755 '{}' \; |
search files with '.rpm' extension and modify permits [man] |
|
# find / -xdev -name \*.rpm |
search files with '.rpm' extension ignoring removable partitions as cdrom, pen-drive, etc.⌠[man] |
|
# locate \*.ps |
find files with the '.ps' extension - first run 'updatedb' command [man] |
|
# whereis halt |
show location of a binary file, source or man [man] |
|
# which halt |
show full path to a binary / executable [man] |
|
| |
|
Mounting a Filesystem
|
| Command |
Description |
|
# fuser -km /mnt/hda2 |
force umount when the device is busy [man] |
|
# mount /dev/hda2 /mnt/hda2 |
mount disk called hda2 - verify existence of the directory '/ mnt/hda2' [man] |
|
# mount /dev/fd0 /mnt/floppy |
mount a floppy disk [man] |
|
# mount /dev/cdrom /mnt/cdrom |
mount a cdrom / dvdrom [man] |
|
# mount /dev/hdc /mnt/cdrecorder |
mount a cdrw / dvdrom [man] |
|
# mount /dev/hdb /mnt/cdrecorder |
mount a cdrw / dvdrom [man] |
|
# mount -o loop file.iso /mnt/cdrom |
mount a file or iso image [man] |
|
# mount -t vfat /dev/hda5 /mnt/hda5 |
mount a Windows FAT32 file system [man] |
|
# mount /dev/sda1 /mnt/usbdisk |
mount a usb pen-drive or flash-drive [man] |
|
# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share |
mount a windows network share [man] |
|
# umount /dev/hda2 |
unmount disk called hda2 - exit from mount point '/ mnt/hda2' first [man] |
|
# umount -n /mnt/hda2 |
run umount without writing the file /etc/mtab - useful when the file is read-only or the hard disk is full [man] |
|
| |
|
Disk Space
|
| Command |
Description |
|
# df -h |
show list of partitions mounted [man] |
|
# dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n |
show the used space by installed deb packages, sorting by size (debian, ubuntu and alike) [man] |
|
# du -sh dir1 |
estimate space used by directory 'dir1' [man] |
|
# du -sk * | sort -rn |
show size of the files and directories sorted by size [man] |
|
# ls -lSr |more |
show size of the files and directories ordered by size [man] |
|
# rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n |
show the used space by rpm packages installed sorted by size (fedora, redhat and alike) [man] |
|
| |
|
Users and Groups
|
| Command |
Description |
|
# chage -E 2005-12-31 user1 |
set deadline for user password [man] |
|
# groupadd [group] |
create a new group [man] |
|
# groupdel [group] |
delete a group [man] |
|
# groupmod -n moon sun |
rename a group from moon to sun [man] |
|
# grpck |
check correct syntax and file format of '/etc/group' and groups existence [man] |
|
# newgrp - [group] |
log into a new group to change default group of newly created files [man] |
|
# passwd |
change password [man] |
|
# passwd user1 |
change a user password (only by root) [man] |
|
# pwck |
check correct syntax and file format of '/etc/passwd' and users existence [man] |
|
# useradd -c "User Linux" -g admin -d /home/user1 -s /bin/bash user1 |
create a new user "user1" belongs "admin" group [man] |
|
# useradd user1 |
create a new user [man] |
|
# userdel -r user1 |
delete a user ( '-r' eliminates home directory) [man] |
|
# usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1 |
change user attributes as description, group and other [man] |
|
| |
|
Permits on Files
|
| Command |
Description |
|
# chgrp group1 file1 |
change group of files [man] |
|
# chmod ugo+rwx directory1 |
set permissions reading (r), write (w) and (x) access to users owner (u) group (g) and others (o) [man] |
|
# chmod go-rwx directory1 |
remove permits reading (r), write (w) and (x) access to users group (g) and others (or [man] |
|
# chmod u+s /bin/file1 |
set SUID bit on a binary file - the user that running that file gets same privileges as owner [man] |
|
# chmod u-s /bin/file1 |
disable SUID bit on a binary file [man] |
|
# chmod g+s /home/public |
set SGID bit on a directory - similar to SUID but for directory [man] |
|
# chmod g-s /home/public |
disable SGID bit on a directory [man] |
|
# chmod o+t /home/public |
set STIKY bit on a directory - allows files deletion only to legitimate owners [man] |
|
# chmod o-t /home/public |
disable STIKY bit on a directory [man] |
|
# chown user1 file1 |
change owner of a file [man] |
|
# chown -R user1 directory1 |
change user owner of a directory and all the files and directories contained inside [man] |
|
# chown user1:group1 file1 |
change user and group ownership of a file [man] |
|
# find / -perm -u+s |
view all files on the system with SUID configured [man] |
|
# ls -lh |
show permits on files [man] |
|
# ls /tmp | pr -T5 -W$COLUMNS |
divide terminal into 5 columns [man] |
|
| |
|
Special Attributes on files
|
| Command |
Description |
|
# chattr +a file1 |
allows write opening of a file only append mode [man] |
|
# chattr +c file1 |
allows that a file is compressed / decompressed automatically by the kernel [man] |
|
# chattr +d file1 |
makes sure that the program ignores Dump the files during backup [man] |
|
# chattr +i file1 |
makes it an immutable file, which can not be removed, altered, renamed or linked [man] |
|
# chattr +s file1 |
allows a file to be deleted safely [man] |
|
# chattr +S file1 |
makes sure that if a file is modified changes are written in synchronous mode as with sync [man] |
|
# chattr +u file1 |
allows you to recover the contents of a file even if it is canceled [man] |
|
# lsattr |
show specials attributes [man] |
|
| |
|
Archives and compressed files
|
| Command |
Description |
|
# bunzip2 file1.bz2 |
decompress a file called 'file1.bz2' [man] |
|
# bzip2 file1 |
compress a file called 'file1' [man] |
|
# gunzip file1.gz |
decompress a file called 'file1.gz' [man] |
|
# gzip file1 |
compress a file called 'file1' [man] |
|
# gzip -9 file1 |
compress with maximum compression [man] |
|
# rar a file1.rar test_file |
create an archive rar called 'file1.rar' [man] |
|
# rar a file1.rar file1 file2 dir1 |
compress 'file1', 'file2' and 'dir1' simultaneously [man] |
|
# rar x file1.rar |
decompress rar archive [man] |
|
# tar -cvf archive.tar file1 |
create a uncompressed tarball [man] |
|
# tar -cvf archive.tar file1 file2 dir1 |
create an archive containing 'file1', 'file2' and 'dir1' [man] |
|
# tar -tf archive.tar |
show contents of an archive [man] |
|
# tar -xvf archive.tar |
extract a tarball [man] |
|
# tar -xvf archive.tar -C /tmp |
extract a tarball into / tmp [man] |
|
# tar -cvfj archive.tar.bz2 dir1 |
create a tarball compressed into bzip2 [man] |
|
# tar -xvfj archive.tar.bz2 |
decompress a compressed tar archive in bzip2 [man] |
|
# tar -cvfz archive.tar.gz dir1 |
create a tarball compressed into gzip [man] |
|
# tar -xvfz archive.tar.gz |
decompress a compressed tar archive in gzip [man] |
|
# unrar x file1.rar |
decompress rar archive [man] |
|
# unzip file1.zip |
decompress a zip archive [man] |
|
# zip file1.zip file1 |
create an archive compressed in zip [man] |
|
# zip -r file1.zip file1 file2 dir1 |
compress in zip several files and directories simultaneously [man] |
|
| |
|
RPM Packages ( Fedora, Red Hat and like)
|
| Command |
Description |
|
# rpm -ivh [package.rpm] |
install a rpm package [man] |
|
# rpm -ivh --nodeeps [package.rpm] |
install a rpm package ignoring dependencies requests [man] |
|
# rpm -U [package.rpm] |
upgrade a rpm package without changing configuration files [man] |
|
# rpm -F [package.rpm] |
upgrade a rpm package only if it is already installed [man] |
|
# rpm -e [package] |
remove a rpm package [man] |
|
# rpm -qa |
show all rpm packages installed on the system [man] |
|
# rpm -qa | grep httpd |
show all rpm packages with the name "httpd" [man] |
|
# rpm -qi [package] |
obtain information on a specific package installed [man] |
|
# rpm -qg "System Environment/Daemons" |
show rpm packages of a group software [man] |
|
# rpm -ql [package] |
show list of files provided by a rpm package installed [man] |
|
# rpm -qc [package] |
show list of configuration files provided by a rpm package installed [man] |
|
# rpm -q [package] --whatrequires |
show list of dependencies required for a rpm packet [man] |
|
# rpm -q [package] --whatprovides |
show capability provided by a rpm package [man] |
|
# rpm -q [package] --scripts |
show scripts started during installation / removal [man] |
|
# rpm -q [package] --changelog |
show history of revisions of a rpm package [man] |
|
# rpm -qf /etc/httpd/conf/httpd.conf |
verify which rpm package belongs to a given file [man] |
|
# rpm -qp [package.rpm] -l |
show list of files provided by a rpm package not yet installed [man] |
|
# rpm --import /media/cdrom/RPM-GPG-KEY |
import public-key digital signature [man] |
|
# rpm --checksig [package.rpm] |
verify the integrity of a rpm package [man] |
|
# rpm -qa gpg-pubkey |
verify integrity of all rpm packages installed [man] |
|
# rpm -V [package] |
check file size, permissions, type, owner, group, MD5 checksum and last modification [man] |
|
# rpm -Va |
check all rpm packages installed on the system - use with caution [man] |
|
# rpm -Vp [package.rpm] |
verify a rpm package not yet installed [man] |
|
# rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm] |
install a package built from a rpm source [man] |
|
# rpm2cpio [package.rpm] | cpio --extract --make-directories *bin* |
extract executable file from a rpm package [man] |
|
# rpmbuild --rebuild [package.src.rpm] |
build a rpm package from a rpm source [man] |
|
| |
|
YUM packages tool (Fedora, RedHat and alike)
|
| Command |
Description |
|
# yum -y install [package] |
download and install a rpm package [man] |
|
# yum localinstall [package.rpm] |
That will install an RPM, and try to resolve all the dependencies for you using your repositories. [man] |
|
# yum -y update |
update all rpm packages installed on the system [man] |
|
# yum update [package] |
upgrade a rpm package [man] |
|
# yum remove [package] |
remove a rpm package [man] |
|
# yum list |
list all packages installed on the system [man] |
|
# yum search [package] |
find a package on rpm repository [man] |
|
# yum clean [package] |
clean up rpm cache erasing downloaded packages [man] |
|
# yum clean headers |
remove all files headers that the system uses to resolve dependency [man] |
|
# yum clean all |
remove from the cache packages and headers files [man] |
|
| |
|
Ovaj popis komandi je kopiran sa stranice
linuxguide.it koji je pod Creative Common licencom. Citat sa njihove stranice: Except where otherwise specified, the contents of LinuGuide.it are licensed under License Creative Commons 2.5 Attribution
Free Distribution if provided Authors and, Not Commercial purposes and, Not Derivated Works 2.5
Puno hvala autorima!!
Na vrh