Adduser
adduser - create a new user or update default new user information [SYNOPSIS] adduser OPTION USER option --home home directory for the new user account --shell the login shell for the new user account --no-create-home with no home directory --uid force use the UID for the new user account --gid force use GROUP for the new user account
Change
chage - change user password expiry information [SYNOPSIS] chage OPTION USER option -l show account aging information -M days set maximim number of days before password change to MAX_DAYS -m days set minimum number of days before password change to MIN_DAYS -W days set expiration warning days to WARN_DAYS -I days set password inactive after expiration to INACTIVE
Crontab
crontab - maintain crontab files for individual users option -e edit user's crontab -l list user's crontab -r delete user's crontab
dmesg
dmesg print or control the kernel ring buffer
exit
exit - exit shell
fmt
fmt - simple optimal text formatter [SYNOPSIS] fmt OPTION FILE option -w WIDTH maximum line width (default of 75 columns)
groupadd
groupadd - create a new group [SYNOPSIS] groupadd OPTION GROUP option -g use GID for the new group
# groupadd -g 510 group
head
head - output the first part of files [SYNOPSIS] head OPTION FILE option no option (default) Print the first 10 lines -N Print the N lines
# head -20 file
ifconfig
ifconfig - configure a network interface [SYNOPSIS] ifconfig INTERFACE ADDRESS show status of active interfaces
# ifconfigenable an interfce
# ifconfig eth0 updisable an interface
# ifconfig eth0 downchange IP address of an interface
# ifconfig eth0 192.168.0.10change subnet-mask of an interface
# ifconfig eth0 netmask 255.255.255.248
localectl
localectl - Query or change system locale and keyboard settings. [SYNOPSIS] localectl {OPTIONS} {COMMAND} OPTIONS --privileged Acquire privileges before execution --no-pager Do not pipe output into a pager --host=[USER@]HOST Operate on remote host
COMMAND status Show current locale settings set-locale LOCALE Set system locale list-locales Show known locales set-keymap MAP Set virtual console keyboard mapping list-keymaps Show known virtual console keyboard mappings set-x11-keymap LAYOUT Set X11 keyboard mapping list-x11-keymap-layouts Show known X11 keyboard mapping layouts list-x11-keymap-models Show known X11 keyboard mapping models
man
man - format and display the on-line manual pages [SYNOPSIS] man COMMAND
mv
mv - move (rename) files [SYNOPSIS] mv OPTION SOURCE DEST option -i prompt before overwrite
# mv -i file /etc-f do not prompt before overwriting
# mv -f file /etc-b like --backup but does not accept an argument
# mv -b file /etc-u move only when the SOURCE file is newer than the destination file or when the destination file is missing
# mv -u file /etc
paste
paste - merge lines of files [SYNOPSIS] paste OPTION FILE1 FILE2 option -d reuse characters from LIST instead of TABs
reboot
reboot - reboot the system
rpmbuild
rpmbuild - Build RPM Package [SYNOPSIS] rpmbuild OPTION SPEC-FILE/SRPM-FILE option -ba Build binary and source packages (after doing the %prep, %build, and %install stages) -bb Build a binary package (after doing the %prep, %build, and %install stages) -bs Build just the source package -bp Executes the "%prep" stage from the spec file. Normally this involves unpacking the sources and applying any patches -bc Do the "%build" stage from the spec file (after doing the %prep stage). This generally involves the equivalent of a "make" -bi Do the "%install" stage from the spec file (after doing the %prep and %build stages)
sort
sort - sort lines of text files [SYNOPSIS] sort OPTION FILE option -o FILE write result to FILE instead of standard output -f fold lower case to upper case characters -r reverse the result of comparisons -n compare according to string numerical value -k --key=POS1[,POS2] start a key at POS1, end it at POS2 (origin 1) -t --field-separator=SEP use SEP instead of non-blank to blank transition
sysctl
sysctl - configure kernel parameters at runtime [SYNOPSIS] sysctl OPTION option -a Display all values currently available. Please see the NOTES -p Load in sysctl settings from the file specified or /etc/sysctl.conf if none given
timedatectl
- timedatectl - Query or change system time and date settings.[SYNOPSIS] timedatectl {OPTIONS} {COMMAND}
OPTIONS --privileged Acquire privileges before execution --no-pager Do not pipe output into a pager --host=[USER@]HOST Operate on remote host COMMAND status Show current time settings set-time TIME Set system time set-timezone ZONE Set system timezone list-timezones Show known timezones
- timedatectl - Query or change system time and date settings.[SYNOPSIS] timedatectl {OPTIONS} {COMMAND}
userdel
userdel - delete a user account and related files [SYNOPSIS] userdel OPTION USER option -r remove home directory and mail spool
which
which - shows the full path of (shell) commands [SYNOPSIS] which COMMAND
zypper
zypper - command-line interface to ZYPP system management library [SYNOPSIS] zypper OPTION1 COMMAND OPTION2 PACKAGE command install Install packages or resolvables
# zypper install packageupdate Update packages
# zypper update packageremove Remove packages or resolvables
# zypper remove packagesearch Search for packages matching a pattern
# zypper search keywordsource-install Install source packages
# zypper source-install package
alias
alias - aliases file for sendmail [SYNOPSIS] alias (alias name) # alias⇒ show all alias# alias la='ls -a'⇒ show all alias for ls command
chgrp
chgrp - change group ownership [SYNOPSIS] chgrp OPTION GROUP FILE/DIRECTORY option -R operate on files and directories recursively
# chgrp -R user dir
cut
cut - remove sections from each line of files [SYNOPSIS] cut OPTION FILE option -c select only these characters -d use DELIM instead of TAB for field delimiter -f select only these fields; also print any line that contains no delimiter character, unless the -s option is specified
dnf
dnf - Package manager for RPM [SYNOPSIS] dnf OPTION COMMAND PACKAGE command install Install a package or packages on your system
# dnf install packagereinstall reinstall a package upgrade Upgrade a package or packages on your system
# dnf upgrade packageupgrade-to Upgrade a package on your system to the specified version remove Remove a package or packages from your system
# dnf remove packagegroup Display, or use, the groups information list List a package or groups of packages check-update Check for available package upgrades info Display details about a package or group of packages provides Find what package provides the given value search Search package details for the given string
# dnf search keywordhistory Display, or use, the transaction history updateinfo Display advisories about packages
option -y answer yes for all questions
# dnf -y install package--enablerepo=repo enable one or more repositories (wildcards allowed)
# dnf --enablerepo=repo install package--disablerepo=repo disable one or more repositories (wildcards allowed)
# dnf --disablerepo=repo install package--installroot [path] set install root --exclude=package exclude packages by name or glob
# dnf --exclude=package update--releasever RELEASEVER override the value of $releasever in config and repo files --noplugins disable all plugins
# dnf --noplugins update
expand
expand - convert tabs to spaces [SYNOPSIS] expand OPTION FILE option -i do not convert tabs after non blanks -t [tabs NUMBER] have tabs NUMBER characters apart, not 8
free
free - Display amount of free and used memory in the system [SYNOPSIS] free OPTION option -m switch displays it in megabytes -k switch displays it in kilobytes -b switch displays it in bytes -s second switch activates continuous polling delay seconds apart
# free -s 3
groupdel
groupdel - remove a group [SYNOPSIS] groupdel GROUP
history
history - list histories of commands
insmod
insmod - simple program to insert a module into the Linux Kernel [SYNOPSIS] insmod OPTION MODULE option -s output rusults to syslog -v show verbose
locate
locate - find files by name [SYNOPSIS] locate FILE Use updatedb if update locate database
mkdir
mkdir - make directories [SYNOPSIS] mkdir OPTION DIRECTORY option -p no error if existing, make parent directories as needed
# mkdir /home/dir1/dir2-m set permission mode (as in chmod), not rwxrwxrwx - umask
# mkdir -m 700 dir
netstat
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multi-cast memberships [SYNOPSIS] netstat OPTION option -a Show both listening and non-listening sockets -r show routing table -i show interface's tables -l Show only listening sockets -n don't resolve names -p Show the PID and name of the program to which each socket belongs -v show verbose -e Display additional information -g display multicast group memberships -s display networking statistics (like SNMP) -o display timers -c continuous listing -M display masqueraded connections -F display Forwarding Information Base (default) -C display routing cache instead of FIB
ping
ping - send ICMP ECHO_REQUEST to network hosts [SYNOPSIS] ping OPTION HOST option -c count Stop after sending count ECHO_REQUEST packets
repquota
repquota - summarize quotas for a filesystem [SYNOPSIS] repquota OPTION FILE-SYSTEM option -a Report on all filesystems indicated in /etc/mtab to be read-write with quotas -v Report all quotas, even if there is no usage. Be also more verbose about quotafile information -u Report quotas for users. This is the default -g Report quotas for groups -s Try to report used space, number of used inodes and limits in more appropriate units than the default ones
rsync
rsync - faster, flexible replacement for rcp [SYNOPSIS] rsync OPTION SRC DEST option -v increase verbosity -a archive mode; same as -rlptgoD (no -H) -u skip files that are newer on the receiver -z compress file data during the transfer --exclude=PATTERN exclude files matching PATTERN --delete delete files that don’t exist on sender # rsync -av --exclude="tmp" /home/ /backup
source
source Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename
systemctl
systemctl - Query or send control commands to the systemd manager. [SYNOPSIS] systemctl OPTIONS COMMAND OPTIONS --all Show all units/properties, including dead/empty ones
# systemctl --all--t List only units of a particular type
# systemctl -t service
COMMAND start Start (activate) one or more units
# systemctl start sendmail.servicestop Stop (deactivate) one or more units
# systemctl stop sendmail.servicereload Reload one or more units
# systemctl reload sendmail.servicerestart Start or restart one or more units
# systemctl restart sendmail.servicestatus Show runtime status of one or more units
# systemctl status sendmail.serviceenable Enable one or more unit files
# systemctl enable sendmail.servicedisable Disable one or more unit files
# systemctl disable sendmail.service
touch
touch - change file timestamps [SYNOPSIS] touch OPTION TIME FILE option -t use [[CC]YY]MMDDhhmm[.ss] instead of current time
# touch -t 200712312359.59 file-a change only the access time -m change only the modification time
uname
uname - print system information [SYNOPSIS] uname OPTION option -n print the network node hostname -s print the kernel name -m print the machine hardware name -p print the processor type or "unknown" -r print the kernel release -v print the kernel version -a print all information, in the following order, except omit -p and -i if unknown
usermod
usermod - modify a user account [SYNOPSIS] usermod OPTION USER option -d new home directory for the user account -g force use GROUP as new primary group -G new list of supplementary GROUPS -s new login shell for the user account -u new UID for the user account -L lock the user account -U unlock the user account
xargs
xargs - build and execute command lines from standard input [SYNOPSIS] xargs OPTION COMMAND
aptitude
aptitude - high-level interface to the package manager [SYNOPSIS] aptitude OPTION COMMAND PACKAGE command install Install/upgrade packages
# aptitude install packageremove Remove packages
# aptitude remove packagepurge Remove packages and their configuration files
# aptitude purge packagesearch Search for a package by name and/or expression show Display detailed information about a package changelog View a package's changelog update Download lists of new/upgradable packages safe-upgrade Perform a safe upgrade full-upgrade Perform an upgrade, possibly installing and removing packages download Download the .deb file for a package reinstall Download and (possibly) reinstall a currently installed package clean Erase downloaded package files forget-new Forget what packages are "new" hold Place packages on hold unhold Cancel a hold command for a package markauto Mark packages as having been automatically installed unmarkauto Mark packages as having been manually installed forbid-version Forbid aptitude from upgrading to a specific package version. why Show the manually installed packages that require a package, or why one or more packages would require the given package why-not Show the manually installed packages that lead to a conflict with the given package, or why one or more packages would lead to a conflict with the given package if installed
option -y Assume that the answer to simple yes/no questions is 'yes'
# aptitude -y install package-s Simulate actions, but do not actually perform them. -d Only download packages, do not install or remove anything. -v Display extra information. (may be supplied multiple times) -q In command-line mode, suppress the incremental progress indicators. -h Help text -V Show which versions of packages are to be installed. -P Always prompt for confirmation or actions -f Aggressively try to fix broken packages. -D Show the dependencies of automatically changed packages. -Z Show the change in installed size of each package. -u Download new package lists on startup. -i Perform an install run on startup.
chkconfig - updates and queries runlevel information for system services
- [SYNOPSIS] chkconfig OPTION SERVICE
option --list This option lists all of the services which chkconfig knows about, and whether they are stopped or started in each runlevel. If name is specified, information in only display about service name. --level Specifies the run levels an operation should pertain to. It is given as a string of numbers from 0 to 6. For example, --level 35 specifies runlevels 3 and 5.
- [SYNOPSIS] chkconfig OPTION SERVICE
date - print or set the system date and time
[SYNOPSIS] date OPTION option -R output date and time in RFC 2822 format
du - estimate file space usage
[SYNOPSIS] du OPTION DIRECTORY option -a write counts for all files, not just directories -h print sizes in human readable format (e.g., 1K 234M 2G) -s display only a total for each argument
export - define $ENV
- [SYNOPSIS] export $ENV
fsck - check and repair a Linux file system
- [SYNOPSIS] fsck OPTION DEVICE
option -n Make no changes to the filesystem -t fslist Specifies the type(s) of file system to be checked
# fsck -t vfat /dev/sda2
- [SYNOPSIS] fsck OPTION DEVICE
groupmod - modify a group definition on the system
- [SYNOPSIS] groupmod OPTION GROUP
option -n change the name to NEW_GROUP
# groupmod -n new_name group-g change the group ID to GID
# groupmod -g 600 group
- [SYNOPSIS] groupmod OPTION GROUP
hostname - display or set its hostname or NIS domain name
[SYNOPSIS] hostname OPTION option -d Display the name of the DNS domain
join - join lines of two files on a common field
[SYNOPSIS] join OPTION FILE1 FILE2 option -j equivalent to ‘-1 FIELD -2 FIELD’ -j 1 join on this FIELD of file 1 -j 2 join on this FIELD of file 2
ls - list directory contents
[SYNOPSIS] ls OPTION FILE/DIRECTORY option -l use a long listing format -a do not ignore entries starting with -d list directory entries instead of contents, and do not dereference symbolic links -r reverse order while sorting -t sort by modification time -S sort by file size -X sort alphabetically by entry extension -i with -l, print the index number of each file -R list subdirectories recursively -F append indicator (one of */=>@|) to entries
mkfs - build a Linux file system
- [SYNOPSIS] mkfs OPTION DEVICE
option -c Check the device for bad blocks before building the file system -t Specifies the type of file system to be built
# mkfs -t ext3 partition
- [SYNOPSIS] mkfs OPTION DEVICE
newaliases
- When changing /etc/aliases , enable the change with the command
pr - convert text files for printing
[SYNOPSIS] pr OPTION FILE option + FIRST_PAGE printing with page FIRST_PAGE - COLUMN output COLUMN columns and print columns down, unless -a is used -w PAGE_WIDTH set page width to PAGE_WIDTH characters for multiple text-column output only, -s[char] turns off
rm - remove files or directories
[SYNOPSIS] rm OPTION FILE option -i prompt before any removal
# rm -i file-f ignore nonexistent files, never prompt
# rm -f file-r(-R) remove directories and their contents recursively
# rm -rf dir
setfacl - set file access control lists
- Usage : setfacl option file
Option -m modify the current ACL(s) of file(s) -x remove entries from the ACL(s) of file(s) -b remove all extended ACL entries -R recurse into subdirectories -d operations apply to the default ACL -k remove the default ACL --restore=file restore ACLs (inverse of `getfacl -R')
- Usage : setfacl option file
split - split a file into pieces
[SYNOPSIS] paste OPTION INPUT PREFIX option -l --lines=NUMBER put NUMBER lines per output file
sysv-rc-conf - Run-level configuration for SysV like init script links
[SYNOPSIS] sysv-rc-conf OPTION SERVICE option --list This option will list all of the services and if they are stopped or started when entering each runlevel
# sysv-rc-conf --list rsync--level The runlevels this operation will affect. levels can be any number from 0-9 or S
# sysv-rc-conf --level 3 rsync off
uniq - report or omit repeated lines
[SYNOPSIS] uniq OPTION INPUT OUTPUT option -d only print duplicate lines -u only print unique lines
vi - Use vi editor
[SYNOPSIS] vi FILE Switch Command mode/Input mode Key Description i insert words on the Cursor position a insert words after the Cursor position I insert words on the head of the line of Cursor position A insert words on the last of the line of Cursor position o insert words on the empty line inserted that is after Cursor position O insert words on the empty line inserted that is before Cursor position [Esc] switch to command mode
Save/Quit Key Description :w save :w file save as a file :q quit without saving(confirmed) :q! quit without saving(forcely) :wq save and quit :e back to the last saved :n switch to other file if some files are opened :r file read content of a file on current line :n,mw file save as a file from n line to m line :n,mw>>file add to a file from n line to m line
Cursor operation Key Description h (or) [←] move to left l (or) [→] move to right k (or) [↑] move to above j (or) [↓] move to below w move to the head of next word b move to the head of previous word 0 move to the head of line $ move to the last of line G move to the last line nG move to n line H move to the head of current screen nH move to n line on current screen L move to the last line on current screen nL move to the line of "n" M move to the head line on current screen
Scrolling operation Key Description [Ctrl] + f scroll down for a screen [Ctrl] + b scroll up for a screen [Ctrl] + d scroll down for half of a screen [Ctrl] + u scroll up for half of a screen
Edit operation Key Description x delete a word on cursor X delete a word before cursor yy copy the current line into the buffer y$ copy from the cursor position to the end of the line into the buffer y0 copy from the head of line to the cursor position into the buffer yw copy a word on cursor into the buffer p paste the contents of the buffer after the cursor position P paste the contents of the buffer before the cursor position dd delete the current line d$ delete from the cursor position to the end of the line d0 delete from the head of the line to the cursor position dw delete from the head of the line to the next word u cancel the last operation U cancel the last operation for a line
Search operation Key Description / word [Enter] search a word from the head of a file to the end ? word [Enter] search a word from the end of a file to the head n search next after a result of searching
yast2
- run YaST Control Center
autoconf - generate configure script
[SYNOPSIS] autoconf OPTION option -h Help text
chmod - change file access permissions
[SYNOPSIS] chmod OPTION PERMISSIONS FILE/DIRECTORY option -R change files and directories recursively
# chmod -R 700 /home
dd - convert and copy a file
[SYNOPSIS] dd OPTION option if=FILE read from FILE instead of stdin of=FILE write to FILE instead of stdout bs=BYTES force ibs=BYTES and obs=BYTES count=BLOCKS copy only BLOCKS input blocks seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
e2fsck - check a Linux ext2/ext3 file system
[SYNOPSIS] e2fsck OPTION DEVICE option -c Check for bad blocks and add them to the badblock list -p Automatic repair (no questions) -v Be verbose -y Assume "yes" to all questions
expr - evaluate expressions
[SYNOPSIS] expr ARG1 EXPRESSION ARG2
ftp - connect to a FTP server
[SYNOPSIS] ftp HOST
groups
print the groups a user is in
hostnamectl - Query or change system hostname.
[SYNOPSIS] hostnamectl {OPTIONS} {COMMAND} OPTIONS --transient Only set transient hostname --privileged Acquire privileges before execution --host=[USER@]HOST Operate on remote host
COMMAND status Show current hostname settings set-hostname HOSTNAME Set system hostname
ldconfig
configure dynamic linker run time bindings
lsmod - program to show the status of modules in the Linux Kernel
- [SYNOPSIS] lsmod
mkswap - set up a Linux swap area
- [SYNOPSIS] mkswap DEVICE
newgrp - log in to a new group
- [SYNOPSIS] newgrp GROUP
quota - display disk usage and limits
[SYNOPSIS] quota OPTION option By default only the user quotas are printed -q Print a more terse message, containing only information on filesystems where usage is over quota
rmdir - remove empty directories
- [SYNOPSIS] rmdir DIRECTORY
note: Use "rm -rf" if directories are not empty
- [SYNOPSIS] rmdir DIRECTORY
setup
setup devices and file systems, mount root file system
ss : display more TCP and state informations
[SYNOPSIS] ss [options] [ FILTER ] Options -h, --help show help -V, --version output version information -n, --numeric don't resolve service names -r, --resolve resolve host names -a, --all display all sockets -l, --listening display listening sockets -o, --options show timer information -e, --extended show detailed socket information -m, --memory show socket memory usage -p, --processes show process using socket -i, --info show internal TCP information -s, --summary show socket usage summary -b, --bpf bpf -Z, --context display process SELinux security contexts -z, --contexts display process and socket SELinux security contexts -4, --ipv4 display only IP version 4 sockets -6, --ipv6 display only IP version 6 sockets -t, --tcp display only TCP sockets -u, --udp display only UDP sockets -d, --dccp display only DCCP sockets -w, --raw display only RAW sockets -x, --unix display only Unix domain sockets -f, --family=FAMILY display sockets of type FAMILY -D, --diag=FILE Dump raw information about TCP sockets to FILE -F, --filter=FILE read filter information from FILE
FILTER := [ state TCP-STATE ] [ EXPRESSION ]
tac - concatenate and print files in reverse
[SYNOPSIS] tac FILE
traceroute - print the route packets trace to network host
[SYNOPSIS] traceroute OPTION HOST
unzip - list, test and extract compressed files in a ZIP archive
[SYNOPSIS] unzip OPTION FILE option -l list archive files (short format) -t test archive files -z display only the archive comment
visudo - edit the sudoers file
[SYNOPSIS] visudo OPTION option -c Enable check-only mode -f FILE Specify and alternate sudoers file location -q Enable quiet mode -s Enable strict checking of the sudoers file
ypcat - print values of all keys in a NIS database
[SYNOPSIS] ypcat OPTION MAP option # ypcat passwd⇒ show passwd map on NIS database# ypcat hosts⇒ show hosts map on NIS database
awk - awk is a pattern scanning and processing language
[SYNOPSIS] awk OPTION (file and so on) option -F specify field-separator
chown - change file owner and group
[SYNOPSIS] chown OPTION USER FILE/DIRECTORY option -R operate on files and directories recursively
# chown -R user dir
depmod - program to generate modules.dep and map files
[SYNOPSIS] depmod OPTION (MODULE) option -a Probe all modules. This option is enabled by default if no file names are given in the command-line.
echo - display a line of text
[SYNOPSIS] echo OPTION STRING option -n do not output the trailing newline -e enable interpretation of backslash escapes
fdisk - Partition table manipulator for Linux
[SYNOPSIS] fdisk DEVICE operation m show help p show partition table n create a new partition d remove a partition t change file-type q quit without saving w quit with saving
getfacl - get file access control lists
Usage : getfacl option file Option -a display the file access control list only -d display the default access control list only -c do not display the comment header -R recurse into subdirectories
gunzip - compress or expand files
[SYNOPSIS] gunzip OPTION FILE option -v Verbose. Display the name and percentage reduction for each file compressed or decompressed
htpasswd - Manage user files for basic authentication
[SYNOPSIS] htpasswd OPTION PASSWORDFILE USER PASSWORD option -c Create the passwdfile. If passwdfile already exists, it is rewritten and truncated -b Use batch mode; i.e., get the password from the command line rather than prompting for it -n Display the results on standard output rather than updating a file -m Use MD5 encryption for passwords -d Use crypt() encryption for passwords (default) -s Use SHA encryption for passwords -p Use plaintext passwords -D Delete user
ldd - print shared library dependencies
[SYNOPSIS] ldd PROGRAM
lspci - list all PCI devices
- lspci - list all PCI devices
modinfo - program to show information about a Linux Kernel module
[SYNOPSIS] modinfo OPTION MODULE option -a show only author -d ahow only description -n show only file name
nl - number lines of files
[SYNOPSIS] nl OPTION FILE option -h use STYLE for numbering header lines -f use STYLE for numbering footer lines
quotacheck - scan a filesystem for disk usage, create, check and repair quota files
[SYNOPSIS] quotacheck OPTION FILE-SYSTEM option -b Forces quotacheck to make backups of the quota file before writing the new data -v quotacheck reports its operation as it progresses -d Enable debugging mode -u Only user quotas listed in /etc/mtab or on the filesystems specified are to be checked -g Only group quotas listed in /etc/mtab or on the filesystems specified are to be checked -c Don’t read existing quota files. Just perform a new scan and save it to disk -f Forces checking and writing of new quota files on filesystems with quotas enabled -a Check all mounted non-NFS filesystems in /etc/mtab -m Don’t try to remount filesystem read-only. See comment with option -M -M This flag forces checking of filesystem in read-write mode if a remount fails -R When used together with the -a option, all filesystems except for the root filesystem are checked for quotas
rmmod - simple program to remove a module from the Linux Kernel
[SYNOPSIS] rmmod OPTION MODULE option -a remove all unused modules -s says use syslog, not stderr
sfdisk - Partition table manipulator for Linux
[SYNOPSIS] sfdisk OPTION DEVICE option -l List the partitions of a device
startx
- initialize an X session
tail - output the last part of files
[SYNOPSIS] tail OPTION FILE option (no option) output the last 10 lines (default) -n, --lines=N output the last N lines, instead of the last 10
# tail -20 file
tune2fs - adjust tunable filesystem parameters on ext2/ext3 filesystems
[SYNOPSIS] tune2fs OPTION DEVICE option -L Set the volume label of the filesystem -j Add an ext3 journal to the filesystem
update-rc.d - install and remove System-V style init script links
[SYNOPSIS] update-rc.d OPTION SERVICE ACTION action defaults make links to start the service in runlevels 2345 and to stop the service in runlevels 016
# update-rc.d sshd defaultsremove remove all links to start the service
# update-rc.d sshd remove
option -n Don't do anything, just show what we would do -f Force removal of symlinks
vncpasswd
- set VNC password
yppasswd - change your password in the NIS database
- yppasswd - change your password in the NIS database
cat - Concatenate FILE(s), or standard input, to standard output.
[SYNOPSIS] cat OPTION FILE option -n number all output lines -b number nonblank output lines -s never more than one single blank line
clear
clear the terminal screen
df - report file system disk space usage
[SYNOPSIS] df OPTION DIRECTORY option -h print sizes in human readable format (e.g., 1K 234M 2G) -m print sizes in M-bytes -k print sizes in K-bytes -i list inode information instead of block usage
edquota - edit user quotas
[SYNOPSIS] edquota OPTION USER/GROUP option -u Edit the user quota. This is the default. -g Edit the group quota. -t Edit the soft time limits for each filesystem. -f filesystems Perform specified operations only for given filesystem (default is to perform operations for all filesystems with quota).
file - determine file type
[SYNOPSIS] file FILE
gpasswd - administer /etc/group and /etc/gshadow
[SYNOPSIS] gpasswd OPTION GROUP option -A Set the list of administrative users
# gpasswd -A user group-a Add the user to the named group
# gpasswd -a user group-d Remove the user from the named group
# gpasswd -d user group-r Remove the password from the named group
# gpasswd -r group
gzip - compress or expand files
[SYNOPSIS] gzip OPTION FILE option -d Decompress -v Verbose -r Travel the directory structure recursively
hwclock - query and set the hardware clock (RTC)
[SYNOPSIS] hwclock OPTION option --systohc Set the Hardware Clock to the current System Time
less - opposite of more
[SYNOPSIS] less OPTION FILE option - N Causes a line number to be displayed at the beginning of each line in the display
cpmmands key description [↓] Forward one line [↑] Backward one line [Space] Forward one window b Backward one window q quit
lvcreate - create a logical volume in an existing volume group
option -n Gives the name for the new logical volume -L Gives the size to allocate for the new logical volume
# lvcreate -L 5G -n NAME VG-h Show helps modprobe - program to add and remove modules from the Linux Kernel
[SYNOPSIS] modprobe OPTION MODULE option -a Insert all module names on the command line -l List all modules matching the given wildcard -r This option causes modprobe to remove, rather than insert a module
ntpq - standard NTP query program
[SYNOPSIS] ntpq OPTION option -p Print a list of the peers known to the server as well as a summary of their state -? show helps -! show helps with more details -v show version info -i Force ntpq to operate in interactive mode
quotaoff - turn filesystem quotas on and off
[SYNOPSIS] quotaoff OPTION FILE-SYSTEM option -a All automatically mounted (no noauto option) non-NFS filesystems in /etc/fstab with quotas will have their quotas turned on. This is normally used at boot time to enable quotas -v Display a message for each filesystem where quotas are turned on -u Manipulate user quotas. This is the default -g Manipulate group quotas -p Instead of turning quotas on just print state of quotas (ie. whether. quota is on or off)
rndc - name server control utility
[SYNOPSIS] rndc COMMAND command reload reload config and zones
# rndc reloadstatus show status of a name server
# rndc statusretransfer zone transfer zones
# rndc retransfer zone
shutdown - bring the system down
[SYNOPSIS] shutdown OPTION TIME MESSAGE -h Halt or poweroff after shutdown
# shutdown -h now-r Reboot after shutdown
# shutdown -r +10-f Skip fsck on reboot
# shutdown -rf +20 "This System will shutdown soon"-k Don’t really shutdown; only send the warning messages to everybody
# shutdown -k now-c Cancel an already running shutdown
# shutdown -c
su - run a shell with substitute user and group IDs
[SYNOPSIS] su [-] USER make the shell a login shell
# su - user
tar - The GNU version of the tar archiving utility
[SYNOPSIS] tar OPTION FILE option f use archive file or device ARCHIVE v verbosely list files processed x extract files from an archive
# tar xvf file.tarz filter the archive through gzip
# tar zxvf file.tar.gzj filter the archive through bzip2
# tar jxvf file.tar.bz2c create a new archive
# tar cvf file.tar file1 file2t list the contents of an archive
# tar tvf file.taru only append files newer than copy in archive
# tar uvf file.tar file1--delete delete from the archive (not on mag tapes!)
# tar --delete -vf file.tar file1
umask
- show umask
updatedb
update a database for mlocate
wc - print the number of newlines, words, and bytes in files
[SYNOPSIS] wc OPTION FILE option -c print the byte counts -l print the newline counts -w print the word counts
ypwhich - return name of NIS server or map master
- ypwhich - return name of NIS server or map master
cd - change directory
[SYNOPSIS] cd DIRECTORY
cp - copy files and directories
[SYNOPSIS] cp OPTION (SOURCE FILE/DIRECTORY] [DEST FILE/DIRECTORY] option -i prompt before overwrite
# cp -i file /etc-f if an existing destination file cannot be opened, remove it and try again
# cp -f file /etc-b like --backup but does not accept an argument
# cp -b file /etc-p preserve the specified attributes (default: mode,ownership,timestamps)
# cp -p file /etc-r(R) copy directories recursively
# cp -R dir /etc
dig - DNS lookup utility
[SYNOPSIS] dig OPTION (HOST NAME/IP ADDR) option typical invocation
# dig yahoo.com-x reverse invocation
# dig -x 111.222.333.444
ethtool - Display or change ethernet card settings
[SYNOPSIS] ethtool INTERFACE
find - search for files in a directory hierarchy
[SYNOPSIS] find PATH OPTION option -name PATTERN Search from file name with the PATTERN
# find ./ -name file.txt-perm PATTERN Search from permissions with the PATTERN
# find ./ -perm -o+x-size SIZE Search from file-size with the SIZE
# find ./ -size 1140c-type TYPE Search from file-type with the TYPE
# find ./ -type d-user USER Search from owner with the USER
# find ./ -user root-group GROUP Search from group with the GROUP
# find ./ -group root-exec COMMAND {} \; Execute command when matching
# find ./ -size 1140c -exec cat {} \;-print list search-result -fprint FILE print the full file name into file file -ls list current file in ‘ls -dils’ format on standard output -nouser No user corresponds to file’s numeric user ID -nogroup No group corresponds to file’s numeric group ID -and Search with "AND" -or Search with "OR" -atime N File was last accessed N*24 hours ago -mtime N File’s data was last modified N*24 hours ago -ctime N File’s status was last changed N*24 hours ago -newer FILE File was modified more recently than file -links N File has N links
grep - print lines matching a pattern
[SYNOPSIS] grep OPTION PATTERN FILE option -i Ignore case distinctions in both the PATTERN and the input files -n Prefix each line of output with the 1-based line number within its input file -v Invert the sense of matching, to select non-matching lines -w Select only those lines containing matches that form whole words -r(R) dir Read all files under each directory, recursively; this is equivalent to the -d recurse option
# grep -r 'word' dir
halt - stop the system
[SYNOPSIS] halt (-p)
id - Print information for USERNAME, or the current user.
[SYNOPSIS] id USER
ln - make links between files
[SYNOPSIS] ln OPTION TARGET LINK_NAME option -s make symbolic links instead of hard links
make - GNU make utility to maintain groups of programs
-f Use file as a makefile
# make -f makefile-n Don't actually run any commands; just print them
mount - mount a file system
[SYNOPSIS] mount OPTION DEVICE MOUNT-POINT option -a Mount all filesystems (of the given types) mentioned in fstab -t The argument following the -t is used to indicate the file system type
# mount -t nfs example.com:/home /mnt
passwd - update a user’s authentication tokens(s)
[SYNOPSIS] passwd OPTION USER option -d This is a quick way to disable a password for an account
# passwd -d user-l This option is used to lock the specified account and it is available to root only
# passwd -l user-u This is the reverse of the -l option - it will unlock the account password by removing the ! prefix
# passwd -u user-x This will set the maximum password lifetime, in days, if the user’s account supports password life-times
# passwd -x 10 user-n This will set the minimum password lifetime, in days, if the user’s account supports password life-times. Available to root only
# passwd -n 10 user-i This will set the number of days which will pass before an expired password for this account will be taken to mean that the account is inactive and should be disabled, if the user’s account supports pass-word lifetimes
# passwd -i 10 user-w This will set the number of days in advance the user will begin receiving warnings that her password will expire, if the user’s account supports password lifetimes
# passwd -w 10 user-S This will output a short information about the status of the password for a given account
# passwd -S useruser PS 2009-09-12 0 99999 7 -1 (Password set, MD5 crypt.)
quotaon - turn filesystem quotas on and off
[SYNOPSIS] quotaon OPTION FILE-SYSTEM option -a All automatically mounted (no noauto option) non-NFS filesystems in /etc/fstab with quotas will have their quotas turned on -v Display a message for each filesystem where quotas are turned on -u Manipulate user quotas. This is the default -g Manipulate group quotas -p Instead of turning quotas on just print state of quotas (ie. whether. quota is on or off) -f Make quotaon behave like being called as quotaoff
rpm - RPM Package Manager
[SYNOPSIS] rpm OPTION PACKAGE option -i This installs a new package
# rpm -i package-F This will upgrade packages, but only if an earlier version currently exists
# rpm -F package-U This upgrades or installs the package currently installed to a newer version
# rpm -U package-e erase (uninstall) package
# rpm -e package-q query packages
# rpm -q package-V verify installed packages
# rpm -V package-K verify package signature
# rpm -K package--rebuilddb rebuild the database indices from the installed package headers
# rpm --rebuilddb--initdb create a new database if one doesn’t already exist
# rpm --initdb--import import PUBKEY
# rpm --import /usr/share/rhn/RPM-GPG-KEYoptions with i, U -v show package name
# rpm -iv package-h display progress
# rpm -ivh package-vv Print lots of ugly debugging information
# rpm -ivv package--nodeps Don’t do a dependency check before installing or upgrading a package
# rpm -ivh --nodeps package--test Don’t really uninstall anything, just go through the motions
# rpm -ivh --test packageoptions with q -a Query all installed packages
# rpm -qa-i Display package information, including name, version, and description. This uses the --queryformat if one was specified
# rpm -qi package-l List files in package
# rpm -ql package-c List only configuration files (implies -l)
# rpm -qc package-d List only documentation files (implies -l)
# rpm -qd package-f Query package owning FILE
# rpm -qf /bin/bash-R List packages on which this package depends
# rpm -qR package-s Display the states of files in the package (implies -l)
# rpm -qs package--last Orders the package listing by install time such that the latest packages are at the top
# rpm -q --last package--changelog Display change information for the package
# rpm -q --changelog package
smbpasswd - change a user’s SMB password
[SYNOPSIS] smbpasswd OPTION USER option -a add user -e enable user -d disable user -n set no password -x delete user -h show helps -c smb.conf file Use the given path to the smb.conf file -r MACHINE specify remote MACHINE -U USER specify remote USER
sudo - sudoedit - execute a command as another user
[SYNOPSIS] sudo OPTION COMMAND option -u USER causes sudo to run the specified command as a user other than root -s runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5) -H sets the HOME environment variable to the homedir of the target user (root by default) as specified in passwd(5) -l The -l (list) option will list out the allowed (and forbidden) commands for the invoking user on the current host -h show help -v sudo will update the user’s timestamp, prompting for the user’s password if necessary -k The option to sudo invalidates the user’s timestamp by setting the time on it to the Epoch -K The option is like -k except that it removes the user’s timestamp entirely -b The option tells sudo to run the given command in the background
tasksel
install or remove packages
umount - unmount file systems
[SYNOPSIS] umount DEVICE # umount /mnt⇒ unmount the device mounted on /mnt
useradd - create a new user or update default new user information
[SYNOPSIS] useradd OPTION USER option -s the login shell for the new user account
# useradd -s /sbin/nologin user-d home directory for the new user account
# useradd -d /home/user user-g force use GROUP for the new user account
# useradd -g group user-e set account expiration date to EXPIRE_DATE
# useradd -e 20081231 user-u force use the UID for the new user account
# useradd -u 550 user-m create home directory for the new user account
# useradd -m user-M do not create user's home directory(overrides /etc/login.defs)
# useradd -M user
wget - The non-interactive network downloader
[SYNOPSIS] wget URL option -c resume getting a partially-downloaded file
yum - Yellowdog Updater Modified
[SYNOPSIS] yum OPTION COMMAND PACKAGE command install Install a package or packages on your system
# yum install packageupdate Update a package or packages on your system
# yum update packageremove Remove the packages
# yum remove packagegroupinstall Install the packages in a group on your system
# yum groupinstall "X Window System"groupupdate Update the packages in a group on your system
# yum groupupdate "X Window System"groupremove Remove the packages in a group from your system
# yum groupremove "X Window System"list List a package or groups of packages
# yum list⇒ display packages that is possible to install# yum list installed⇒ display installed packagescheck-update Check for available package updates
# yum check-updateinfo Display details about a package or group of packages
# yum info packagesearch Search package details for the given string
# yum search keyworddeplist List a package's dependencies
# yum deplist package
option -y answer yes for all questions
# yum -y install package--enablerepo=repo enable one or more repositories (wildcards allowed)
# yum --enablerepo=repo install package--disablerepo=repo disable one or more repositories (wildcards allowed)
# yum --disablerepo=repo install package--exclude=package exclude package(s) by name or glob
# yum --exclude=package update--noplugins disable Yum plugins
# yum --noplugins update
- www.hackthesec.co.in
Subscribe to:
Posts (Atom)
0 comments:
Post a Comment