FreeKB - Linux Commands articles
Linux Commands articles

Commands$? (return code)7zalias (create commands)apt-cache (search for a package)apt-get (install update packages)arp (address resolution protocol)at (schedule a one time job)awkbase64 commandbasenamebatch (schedule jobs)blkid command (determine file system type)bunzip2 (unzip a bzip2 archive)bzip2 (compress file)Capture packets using the tcpdump commandcat or tac (view the content of a file)chage (user account aging information expire password)chkconfig (runlevel)chmod (change a file or directory standard permissions)chown (change ownership)cp (copy)cpio (create, view, and extract an archive)Create file using the touch commandcutdate commanddebugfs command (recover a deleted file)declare commandDelete files and directories using the rm (remove) commanddf command (disk filesystem usage)df command (inodes)dhclient (dhcp - obtain, renew, and release IP address)diff command (differences between files)dig (name server lookup DNS)dig (view DNS information)Display CPU details using the lscpu commandDisplay file atime ctime mtime using the stat commandDisplay how long server has been running using the uptime commanddu (disk usage)echo (print output)edquota (edit quota)env (list environment variables)env (list environment variables)evalexec (execute a command)expand (replace tabs with spaces)fdisk (create a disk partition)fdisk (delete a disk partition)fdisk command (increase the size of a disk partition)file command (determine file system type)file command (determine file type)findfind command - date accessed (-atime)find command - date changed (-ctime)find command - date modified (-mtime)find command - exclude "permission denied"find command - exclude directories from search (-not -path)find command - Exclude file systems from search (-xdev)find command - executable filesfind command - hidden files and directoriesfind command - mindepth and maxdepthfind files owned by groupfind files owned by userfind files that match permissionFind files using the locate commandfold (wrap text)free (view RAM memory)fuser (determine the PID of a file)fuser (view kill processes)gdisk (format disk partition)genkey (create a public / private key pair using crypto-utils)getfacl (view access control entries)gpasswd (change group password)grepgrep (--exclude-dir)groupadd (create group)groupmod (modify group)growisofs (burn CD or DVD)gunzip (unzip a gzip archive)gzip (compress file)hash commandhistoryhostnamehtpasswd (add user)htpasswd (delete user)hwclock (hardware clock)iconv (character encoding standard)id commandifconfig (IP address information)ifconfig command (temporarily change the MAC address)ifconfig promisc (promiscuous mode)info (information about a command)insmod (insert a module)ipip neighborhood (view address resolution cache)ipcrc (remove semaphores)ipcs (list semaphores)isql (connect to a database)isql --version (SQL version)join (combine or merge lines in two different files)journalctl (view the journal)journalctl (word wrap text)journalctl --since and --until filterskill (end a process)killall (end a process)last (view current and recently logged in users)ldd (shared libraries)List CPU stats using the sar commandList LDAP and local user accounts using the getent passwd commandList the amount of memory and CPU used using the top commandln (hard soft symbolic symlink links)locale (language, country, character encoding standard)logger (add records to a log file)lp (print a file)lpc (list printers)lpq (print queue)lpr (print a file)lprm (remove print jobs)lpstat (list available printers)ls (list)ls (list) --ignorelsblk command (list hard drive solid state drive)lsmod (list loaded modules)lsof commandman (view manual for a command)md5summdadm --detail (show details of RAID array)mdadm --examine (partition RAID)mdadm --stop (stop a RAID array)mkdir (make directory)mke2fs (create a file system)mkfs (create a file system)modinfo (view module information)modprobe (insert and remove modules)mount (mount a partition or share)mv (move)netstat (view network connections)nice (influence a process to run with higher or lower priority)nl (number lines)nmcli connection shownmcli general statusnmcli hostnamenmcli modifynohup command (run a process while logged out)nslookup (name server lookup DNS)ntpdate (synchronize to an NTP server)ntpq (view NTP servers being used)parted (format disk partition)passwd (change a users password)paste (read, delimit, combine files)pdbedit command (Samba users)pr (format file for printing)printf (print output)Prompt for user input using the read commandps commad - show processes being run by a certain user (-U)ps command (process PID)ps command - add additional columns (-f)ps command - display a process associated with a certain PID (-p)ps command - display how long a process has been running (-o etime etimes)ps command - show all running processes (-e -A ax)ps command - show processes being run by a system service (-C)quotacheck command (check disk quota)quotaon (enable quota)Remove a module using the rmmod commandRemove directory using rmdirrenice (influence a process to run with higher or lower priority)repquota command (view quota)resolvectl command (DNS)restoreconroute (view and create network routes)rpm2cpio command (compress an RPM package into a CPIO archive)rsync (remote copy)schedule reoccurring jobs using crontab (cron table)scp (transfer files using secure copy protocol)sed (delete)sed (replace string)Send and retrieve email using the mail commandSend and retrieve email using the sendmail commandseq (sequence of numbers)service commandSet file atime ctime mtime using the touch commandsetfacl (create update access control entries)Setting time zone using the TZ variablesha256sumshutdown (shutdown, reboot, halt, poweroff)sortsource (export variable)split (divide a single file into multiple files)ssh-copy-idssh-keyscan command (get SSH keys)star (create, view, extract an archive)su (switch user)sudosudo (give a group permission to run certain commands)sudo (give a user permission to run certain commands)systemctl commandtee (redirect output to both the console and a file)testtimedatectltr (trade, replace, change characters)tracepath (trace route to a host)traceroutetzselect (time zone select)ulimit (list and update a users limits)umask (view and update default permission masks)umount (unmount a partition or share)uname (display information about the kernel)unexpand (replace spaces with tabs in a file)unfold (unwrap text)uniq (filter unique lines)unlinkunset (undefine a variable)unzipuseradd (create a user account)userdel (delete user account)usermod (modifying a users account)Validate an XML and XSD file using the xmllint commandw (view logged in users)wall (send message to other systems)watch command (run a command once every x seconds)wc (count words, characters, and lines)wget (download files from remote systems)whereis commandwhich commandwho (view logged in users)xargs (convert stdin to an argument)xml_grep (parse XML file)xwininfo command (display information about a window)yum (download, install, remove, update packages)yumdownloader (download a package)zipTroubleshootingResolve "End of central directory signature not found"Resolve "mount: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program."Resolve "not allowed to run sudo"Resolve "The semaphore timeout period has expired"Resolve "too many open files"Resolve "ulimit: open files: cannot modify limit: Operation not permitted"Resolve error "Mount Error(13) Permission Denied"