├── Basic_commands.md ├── LICENSE ├── LinuxCommands.md └── README.md /Basic_commands.md: -------------------------------------------------------------------------------- 1 | 2 |

Basic Linux/Unix Commands

3 | 4 | - `pwd` : _to print current directory location_ 5 | 6 | - `ls` : _to list contents of the current directory_ 7 | 8 | - flags with ls:- 9 | 10 | - `-a`: _list all files including hidden ones (starting with '.')_ 11 | 12 | - `--color`: _colored list[=always/never/auto]_ 13 | 14 | - `-l`: _list with long format_ 15 | 16 | - `-la`: _list long format along with hidden files_ 17 | 18 | - `-lh`: _list long format with readable file size_ 19 | 20 | - `-ls`: _list long format with file size_ 21 | 22 | - `-r`: _list in reverse order_ 23 | 24 | - `-R`: _list recursively directory tree_ 25 | 26 | - `-s`: _list file size_ 27 | 28 | - `-S`: _sort by file size_ 29 | 30 | - `-t`: _sort by time & date_ 31 | 32 | - `-X`: _sort by extension name_ 33 | 34 | - `~`: _list user's home directory_ 35 | 36 | - `-d */`: _list directories only_ 37 | 38 | - `-d $PWD/*`: _list files and directories with full path_ 39 | 40 | - `cd`: _to go to a directory_ 41 | 42 | - `cd ..`: _go back_ 43 | 44 | - `touch`: _create file_ 45 | 46 | - `nslookup`: _to get domain name or IP address_ 47 | 48 | - `cp`: _copy file to a location_ 49 | 50 | - `mv`: _move file to a location_ 51 | 52 | - `locate`: _locate a file in Linux system_ 53 | 54 | - `cat`: _concatenate and print files_ 55 | 56 | - flags with cat:- 57 | 58 | - `-b`: _Number the non-blank output lines(starting with 1)_ 59 | 60 | - `-n`: _Number all output lines even the blank ones_ 61 | 62 | - `-E`: _Display $ at end of each line_ 63 | 64 | - `sudo`: _for command to be done in root or administrative privileges_ 65 | 66 | - `mkdir`: _for creating a folder_ 67 | 68 | - flags with mkdir:- 69 | 70 | - `-v`: _Print a message for each created directory_ 71 | 72 | - `-p`: _No error if existing,make parent directories as needed_ 73 | 74 | - `rm`: _for deleting folder or file_ 75 | 76 | - flags with rm:- 77 | - `-f, --force`: _ignore nonexistent files and arguments, never prompt_ 78 | - `-i`: _prompt before every removal_ 79 | - `I`: _prompt once before removing more than three files, or when removing recursively; less intrusive than -i, while still giving protection against most mistakes_ 80 | - `--interactive[=WHEN]`: _prompt according to WHEN: never, once (-I), or always (-i); without WHEN, prompt always_ 81 | - `--one-file-system`: _when removing a hierarchy recursively, skip any directory that is on a file system different from that of the corresponding command line argument_ 82 | - `--no-preserve-root`: _do not treat '/' specially_ 83 | - `--preserve-root`: _do not remove '/' (default)_ 84 | - `-r, -R, --recursive`: _remove directories and their contents recursively_ 85 | - `-d, --dir`: _remove empty directories_ 86 | - `-v, --verbose`: _explain what is being done_ 87 | - `--help`: _display this help and exit_ 88 | - `--version`: _output version information and exit_ 89 | 90 | - `man`: _for showing the manual pages of a command_ 91 | 92 | - `df`: _to see available disk space in each partition of system_ 93 | 94 | - `du`: _to know the disk usage of a file in your system_ 95 | 96 | - `tar`: _used to compress and decompress various tar archives_ 97 | 98 | - `uname -a`: _to show the system information_ 99 | 100 | - `chmod`: _to make a file executable_ 101 | 102 | - `ping`: _to check connection to your server_ 103 | 104 | - `clear`: _to clear the terminal_ 105 | 106 | - `kill`: _to send a signal to process. by default, the message is sent as termination signal_ 107 | 108 | - `echo`: _to display line of text/string that are passed as an argument_ 109 | - flags with echo:- 110 | 111 | - `-n`: _do not append a newline_ 112 | 113 | - `-E`: _Explicitly suppress interpretation of backslash escapes_ 114 | 115 | - `grep`: _to search a file for particular pattern of characters_ 116 | 117 | - flags with grep:- 118 | 119 | - `-i`: _ignores the cases for matching_ 120 | 121 | - `-n`: _display the matched line and corresponding line number_ 122 | 123 | - `-r`: _recursively read all the files under each directory_ 124 | 125 | - `dig domain`: _get DNS for domain_ 126 | 127 | - `wget -c file`: _continue stopped download_ 128 | 129 | - `wget -r url`: _recursively download files from url_ 130 | 131 | - `date`: _show current date/time_ 132 | 133 | - `uptime`: _show uptime_ 134 | 135 | - `whoami`: _who are you logged as_ 136 | 137 | - `ssh user@host`: _connect to host as user_ 138 | 139 | - `ssh -p port user@host`: _connect using port p_ 140 | 141 | - `find` : _to search for files in a directory hierarchy_ 142 | 143 | - flags with find:- 144 | 145 | - `-inum N` : _Search for files with inode number ‘N’_ 146 | 147 | - `-links N` : _Search for files with ‘N’ links_ 148 | 149 | - `-print` : _Display the path name of the files found by using the rest of the criteria_ 150 | 151 | - `-empty` : _Search for empty files and directories_ 152 | 153 | - `tail` : _to output the last part of files_ 154 | 155 | - flags with tail:- 156 | 157 | - `-n` : _print last N number of lines_ 158 | 159 | - `-f` : _for monitoring the file_ 160 | 161 | - `-pid` : _Display the pid_ 162 | 163 | - `netstat` : _to displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc._ 164 | 165 | - flags with netstat:- 166 | 167 | - `-a`: _To List All Network Ports_ 168 | 169 | - `-at`: _To List All TCP Ports_ 170 | 171 | - `-s`: _To Show Statistics for All Ports_ 172 | 173 | - `-au`: _To List UDP Ports connections_ 174 | 175 | - `-l`: _To List all LISTENING Connections_ 176 | 177 | - `-tp`: _To Display Service name with PID_ 178 | 179 | - `-g`: _To Display IPv4 and IPv6 Information_ 180 | 181 | - `reboot`: _reboot the system_ 182 | 183 | - `shutdown`: _shut down the system_ 184 | 185 | - flags with shutdown:- 186 | - `--help`: _show help_ 187 | 188 | - `--halt`: _halt the machine_ 189 | 190 | - `--poweroff`: _power-off the machine_ 191 | 192 | - `--reboot`: _Reboot the machine_ 193 | 194 | - `-h`: _equivalent to --poweroff, overridden by --halt_ 195 | 196 | - `-k`: _don't halt/power-off/reboot, just send warnings_ 197 | 198 | - `--no-wall`: _don't send wall message before halt/power-off/reboot_ 199 | 200 | - `-c`: _cancel a pending shutdown_ 201 | 202 | - `exit`: _Close the terminal window or end the execution of a shell script_ 203 | 204 | - `history`: _Display or manipulate the history list(history list contains the commands you have previously issued on terminal)_ 205 | 206 | - flags with history:- 207 | - `-c`: _clear the history list_ 208 | 209 | - `-w`: _write the current history to the history file_ 210 | 211 | - `-r`: _read the history file and append contents to history list_ 212 | 213 | - `!!`: _repeats your previous command_ 214 | 215 | - `whereis`: _searches the paths of binary files, manual and sources for files matching the criteria provided_ 216 | 217 | - flags with whereis:- 218 | - `-b`: _search only for binaries_ 219 | 220 | - `-m`: _search only for manuals_ 221 | 222 | - `-s`: _search only for sources_ 223 | 224 | - `-h` or `--help`: _display help text and exit_ 225 | 226 | - `-v` or `--version`: _display version information and exit_ 227 | 228 | - `which`: _searches for a command in the PATH and gives you the first one it finds_ 229 | 230 | - flags with which:- 231 | - `-a`: _if commands with the same name exist in more than one path, specify the -a parameter so that which continues its search_ 232 | 233 | - `wc`: _print line, word, and byte counts for file_ 234 | 235 | - flags with wc:- 236 | - `-l` or `--lines`: _print the line counts_ 237 | 238 | - `-c` or `--bytes`: _print the byte counts_ 239 | 240 | - `-m` or `--chars`: _print the character counts_ 241 | 242 | - `-L` or `--max-line-length`: _print the maximum display width_ 243 | 244 | - `-w` or `--words`: _print the word counts_ 245 | 246 | - `--help`: _display help text and exit_ 247 | 248 | - `--version`: _display version information and exit_ 249 | 250 | - `unzip`: _list, test and extract compressed files in a ZIP archive_ 251 | 252 | - flags with unzip: 253 | - `-x`: _an optional list of archive members to be excluded from processing_ 254 | - `-d`: _an optional directory to which to extract files_ 255 | - `-f`: _freshen existing files, i.e., extract only those files that already exist on disk and that are newer than the disk copies_ 256 | - `-x`: _list archive files (short format)_ 257 | 258 | - `cut`: _allows to select fields_ 259 | 260 | - flags with cut:- 261 | - `-d DELIM` or `--delimiter=DELIM`: _use DELIM as delimiter instead of TAB_ 262 | 263 | - `-f FIELD_NUMBER[,FIELD_NUMBER_LIST]`: _select only these fields_ 264 | 265 | - `-z`: _line delimiter is NUL not newline_ 266 | 267 | - `-s`: _do not print lines not containing delimiters_ 268 | 269 | - `--help`: _display help text and exit_ 270 | 271 | - `--version`: _display version information and exit_ 272 | 273 | - `top`: _provides a dynamic real-time view of a running system, as it can display system summary information as well as a list of processes or threads currently being managed by the Linux kernel_ 274 | 275 | - flags with top: 276 | - `-b`: _starts top in batch mode, which could be useful for sending output from top to other programs or to a file_ 277 | - `-d`: _specifies the delay between screen updates, and overrides the corresponding value in one's personal configuration file or the startup default_ 278 | - `-H`: _instructs top to display individual threads_ 279 | - `-n`: _specifies the maximum number of iterations, or frames, top should produce before ending_ 280 | 281 | - `uniq`: _report or omit repeated lines_ 282 | 283 | - flags with uniq:- 284 | - `-c` or `--count`: _prefix lines by the number of occurrences_ 285 | 286 | - `-i`: _ignore differences in case when comparing_ 287 | 288 | - `-d`: _only print duplicate lines, one for each group_ 289 | 290 | - `-u`: _only print unique lines_ 291 | 292 | - `--help`: _display help text and exit_ 293 | 294 | - `--version`: _display version information and exit_ 295 | 296 | - 'ifconfig' _the most important command from networks commands_ 297 | 298 | - flags with ifconfig:_ 299 | - `-a`: _all interfaces will be shown(not active too)_ 300 | - `-s`: _shortlist_ 301 | - `-v`: _more errors knowledge_ 302 | 303 | - `zip`: _compression and file packaging utility for Unix_ 304 | 305 | - flags with zip: 306 | - `-d`: _removes the file from the zip archive_ 307 | - `-u`: _updates the file in the zip archive_ 308 | - `-m`: _deletes the original files after zipping_ 309 | - `-r`: _recursively zips the files in a directory_ 310 | - `-x`: _excludes the files in creating the zip_ 311 | 312 | - `ps`: _(Process status) can be used to see/list all the running processes_ 313 | 314 | - flags with ps: 315 | - `-f`: _full information_ 316 | - ``: _filter by a single process id_ 317 | - `-a`: _shows information about all users_ 318 | - `-x`: _hows information about processes without terminals_ 319 | - `-e`: _displays extended information_ 320 | 321 | - `factor`: _can be used to show a factor of a number 322 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 gandalf0079 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LinuxCommands.md: -------------------------------------------------------------------------------- 1 | Here are the Linux Commands: 2 | 3 | 4 | #a 5 | 6 | >>adduser/addgroup- The adduser and addgroup commands are used to add a user and group to the system respectively according to the default configuration specified in /etc/adduser.conf file. 7 | 8 | >>agetty-It is a program which manages physical or virtual terminals and is invoked by init. Once it detects a connection, it opens a tty port, asks for a user’s login name and calls up the /bin/login command. Agetty is a substitute of Linux getty. 9 | 10 | >>alias- It is a useful shell built-in command for creating aliases (shortcut) to a Linux command on a system. It is helpful for creating new/custom commands from existing Shell/Linux commands (including options). 11 | 12 | >>anacron- It is a Linux facility used to run commands periodically with a frequency defined in days, weeks and months. 13 | 14 | >>apropos- This command is used to search and display a short man page description of a command/program as follows. 15 | 16 | >>apt- This tool is a relatively new higher-level package manager for Debian/Ubuntu systems. 17 | 18 | >>apt-get- is a powerful and free front-end package manager for Debian/Ubuntu systems. It is used to install new software packages, remove available software packages, upgrade existing software packages as well as upgrade entire operating system. 19 | >>apt-install- this command in Debian/Ubuntu allow to specify one or more package names to install from the system’s software repositories. It will add new sofatware to the sysytem. 20 | >>aptitude- is a powerful text-based interface to the Debian GNU/Linux package management system. Like apt-get and apt; it can be used to install, remove or upgrade software packages on a system. 21 | 22 | >>arch- It is a simple command for displaying machine architecture or hardware name (similar to uname -m). 23 | 24 | >>arp- ARP (Address Resolution Protocol) is a protocol that maps IP network addresses of a network neighbor with the hardware (MAC) addresses in an IPv4 network. 25 | 26 | >>at- It is used to schedule tasks to run in a future time. It’s an alternative to cron and anacron, however, it runs a task once at a given future time without editing any config files. 27 | 28 | >>atq- This command is used to view jobs in at command queue. 29 | 30 | >>atrm- This command is used to remove/deletes jobs (identified by their job number) from at command queue. 31 | 32 | >>awk- It is a powerful programming language created for text processing and generally used as a data extraction and reporting tool. 33 | 34 | 35 | #b 36 | 37 | >>batch- It is also used to schedule tasks to run a future time, similar to the at command. 38 | 39 | >>basename- This command helps to print the name of a file stripping of directories in the absolute path. 40 | 41 | >>bc- It is a simple yet powerful and arbitrary precision CLI calculator language. 42 | 43 | >>bg- It is a command used to send a process to the background. 44 | 45 | >>bzip-This command is used to compress or decompress file(s). 46 | 47 | 48 | #c 49 | 50 | >>cal- The cal command print a calendar on the standard output. 51 | 52 | >>cat- This command is used to view contents of a file or concatenate files, or data provided on standard input, and display it on the standard output. 53 | 54 | >>chgrp- chgrp command is used to change the group ownership of a file. Provide the new group name as its first argument and the name of file as the second argument like this 55 | 56 | >>chmod- This command is used to change/update file access permissions like this. 57 | 58 | >>chown- This command changes/updates the user and group ownership of a file/directory. 59 | 60 | >>cksum- This command is used to display the CRC checksum and byte count of an input file. 61 | 62 | >>clear- This command lets you clear the terminal screen, simply type. 63 | 64 | >>cmp- This performs a byte-by-byte comparison of two files. 65 | 66 | >>comm- This command is used to compare two sorted files line-by-line. 67 | 68 | >>cp- This command is used for copying files and directories from one location to another. 69 | 70 | 71 | #d 72 | 73 | >>date- This command displays/sets the system date and time 74 | 75 | >>dd- This command is used for copying files, converting and formatting according to flags provided on the command line. It can strip headers, extracting parts of binary files and so on. 76 | 77 | >>df- This command is used to show file system disk space usage. 78 | 79 | >>diff- This command is used to compare two files line by line. It can also be used to find the difference between two directories in Linux 80 | 81 | >>dir- This command works like Linux ls command, it lists the contents of a directory. 82 | 83 | >>dmidecode- This command is a tool for retrieving hardware information of any Linux system. It dumps a computer’s DMI (a.k.a SMBIOS) table contents in a human- readable format for easy retrieval. 84 | 85 | >>du- This command is used to show disk space usage of files present in a directory as well as its sub-directories 86 | 87 | 88 | #e 89 | 90 | >>echo- This command prints a text of line provided to it. 91 | 92 | >>eject- This command is used to eject removable media such as DVD/CD ROM or floppy disk from the system. 93 | 94 | >>env- This command lists all the current environment variables and used to set them as well. 95 | 96 | >>exit- This command is used to exit a shell like so. 97 | 98 | >>expr- command is used to calculate an expression 99 | 100 | 101 | #f 102 | 103 | >>factor- This command is used to show the prime factors of a number. 104 | 105 | >>find- This command lets you search for files in a directory as well as its sub-directories. It searches for files by attributes such as permissions, users, groups, file type, date, size and other possible criteria. 106 | 107 | >>free- This command shows the system memory usage (free, used, swapped, cached, etc.) in the system including swap space. Use the '-h' option to display output in human friendly format. 108 | 109 | 110 | #g 111 | 112 | >>grep- This command searches for a specified pattern in a file (or files) and displays in output lines containing that pattern. 113 | 114 | >>groups- This command displays all the names of groups a user is a part of. 115 | 116 | >>gzip- This helps to compress a file, replaces it with one having a .gz extension. 117 | 118 | >>gunzip- Thisexpands or restores files compressed with gzip command. 119 | 120 | 121 | #h 122 | 123 | >>head- This command is used to show first lines (10 lines by default) of the specified file or stdin to the screen. 124 | 125 | >>history- This command is used to show previously used commands or to get info about command executed by a user. 126 | 127 | >>hostname- This command is used to print or set system hostname in Linux. 128 | 129 | >>hostnamectl- This command controls the system hostname under systemd. It is used to print or modify the system hostname and any related settings. 130 | 131 | >>hwclock- It is a tool for managing the system hardware clock; read or set the hardware clock (RTC). 132 | 133 | >>hwinfo- It is used to probe for the hardware present in a Linux system like this. 134 | 135 | 136 | #i 137 | 138 | >>id- This command shows user and group information for the current user or specified username. 139 | 140 | >>ifconfig- This command is used to configure a Linux systems network interfaces. It is used to configure, view and control network interfaces. 141 | 142 | >>ionice- ionice command is used to set or view process I/O scheduling class and priority of the specified process. If invoked without any options, it will query the current I/O scheduling class and priority for that process. 143 | 144 | >>iostat- It is used to show CPU and input/output statistics for devices and partitions. It produces useful reports for updating system configurations to help balance the input/output load between physical disks. 145 | 146 | >>ip- This command is used to display or manage routing, devices, policy routing and tunnels. It also works as a replacement for well known ifconfig command. This command will assign an IP address to a specific interface 147 | 148 | >>iptables- It is a terminal based firewall for managing incoming and outgoing traffic via a set of configurable table rules. 149 | 150 | >>iw- This command is used to manage wireless devices and their configuration. 151 | 152 | >>iwlist- This command displays detailed wireless information from a wireless interface. 153 | 154 | #k 155 | 156 | >>kill- This command is used to kill a process using its PID by sending a signal to it (default signal for kill is TERM). 157 | 158 | >>killall- This command is used to kill a process by its name. 159 | 160 | >>kmod- This is used to manage Linux kernel modules. To list all currently loaded modules, type. 161 | 162 | >>kubectl- This is used to control the Kubernetes cluster manager. 163 | 164 | #l 165 | 166 | >>last- This command display a listing of last logged in users. 167 | 168 | >>ln- This command is used to create a soft link between files using the -s flag. 169 | 170 | >>locate- This command is used to find a file by name. The locate utility works better and faster than it’s find counterpart. 171 | 172 | >>login- This command is used to create a new session with the system. You’ll be asked to provide a username and a password to login. 173 | 174 | >>ls- This command is used to list contents of a directory. It works more or less like dir command. The '-l' option enables long listing format. 175 | 176 | >>lshw- This command is a minimal tool to get detailed information on the hardware configuration of the machine, invoke it with superuser privileges to get a comprehensive information. 177 | 178 | >>lscpu- This command displays system’s CPU architecture information (such as number of CPUs, threads, cores, sockets, and more). 179 | 180 | >>lsof- This command displays information related to files opened by processes. Files can be of any type, including regular files, directories, block special files, character special files, executing text reference, libraries, and stream/network files. To view files opened by a specific user’s processes. 181 | 182 | >>lsusb- lsusb command shows information about USB buses in the system and the devices connected to them. 183 | 184 | 185 | #m 186 | 187 | >>man- This command is used to view the on-line reference manual pages for commands/programs. 188 | 189 | >>mdsum- This command is used to compute and print the MD5 message digest of a file. If run without arguments, debsums checks every file on your system against the stock md5sum files. 190 | 191 | >>mkdir- This command is used to create single or more directories, if they do not already exist (this can be overridden with the -p option). 192 | 193 | >>more- This command enables you to view through relatively lengthy text files one screenful at a time. 194 | 195 | >>mv- This command is used to rename files or directories. It also moves a file or directory to another location in the directory structure. 196 | 197 | 198 | #n 199 | 200 | >>nano- This is a popular small, free and friendly text editor for Linux; a clone of Pico, the default editor included in the non-free Pine package. 201 | 202 | >>nc/netcat- nc (or netcat) is used for performing any operation relating to TCP, UDP, or UNIX-domain sockets. It can handle both IPv4 and IPv6 for opening TCP connections, sending UDP packets, listening on arbitrary TCP and UDP ports, performing port scanning. 203 | 204 | >>netstat- netstat command displays useful information concerning the Linux networking subsystem (network connections, routing tables, interface statistics, masquerade connections, and multicast memberships). This command will display all open ports on the local system: 205 | 206 | >>nice- This command is used to show or change the nice value of a running program. It runs specified command with an adjusted niceness. When run without any command specified, it prints the current niceness. 207 | 208 | >>nmap- It is a popular and powerful open source tool for network scanning and security auditing. It was intended to quickly scan large networks, but it also works fine against single hosts. 209 | 210 | >>nproc- Thiscommand shows the number of processing units present to the current process. It’s output may be less than the number of online processors on a system. 211 | 212 | 213 | #o 214 | 215 | >>openssl- The openssl is a command line tool for using the different cryptography operations of OpenSSL’s crypto library from the shell. The command below will create an archive of all files in the current directory and encrypt the contents of the archive file: 216 | 217 | 218 | #p 219 | 220 | >>passwd- This command is used to create/update passwords for user accounts, it can also change the account or associated password validity period. Note that normal system users may only change the password of their own account, while root may modify the password for any account. 221 | 222 | >>pidof- This displays the process ID of a running program/command. 223 | 224 | >>ping- This command is used to determine connectivity between hosts on a network (or the Internet). 225 | 226 | >>ps- It shows useful information about active processes running on a system. 227 | 228 | >>pstree- It displays running processes as a tree which is rooted at either PID or init if PID is omitted. 229 | 230 | >>pwd- This command displays the name of current/working directory as below. 231 | 232 | 233 | #r 234 | 235 | >>rdiff-backup- rdiff-backup is a powerful local/remote incremental backup script written in Python. It works on any POSIX operating system such as Linux, Mac OS X. Note that for remote backups, you must install the same version of rdiff-backup on both the local and remote machines. 236 | 237 | >>reboot- This command may be used to halt, power-off or reboot a system. 238 | 239 | >>rename- This command is used to rename many files at once. If you’ve a collection of files with “.html” extension and you want to rename all of them with “.php” extension, 240 | 241 | >>rm- This command is used to remove files or directories. 242 | 243 | >>rmdir- This command helps to delete/remove empty directories. 244 | 245 | 246 | #s 247 | 248 | >>scp- This command enables you to securely copy files between hosts on a network. 249 | 250 | >>shutdown- This command schedules a time for the system to be powered down. It may be used to halt, power-off or reboot the machine 251 | 252 | >>sleep- This command is used to delay or pause (specifically execution of a command) for a specified amount of time. 253 | 254 | >>sort- This command is used to sort lines of text in the specified file(s) or from stdin. 255 | 256 | >>split- split as the name suggests, is used to split a large file into small parts. 257 | 258 | >>ssh- ssh (SSH client) is an application for remotely accessing and running commands on a remote machine. It is designed to offer a secure encrypted communications between two untrusted hosts over an insecure network such as the Internet. 259 | 260 | >>stat- It is used to show a file or file system status like this (-f is used to specify a filesystem). 261 | 262 | >>su- This command is used to switch to another user ID or become root during a login session. Note that when su is invoked without a username, it defaults to becoming root. 263 | 264 | >>sudo- This command allows a permitted system user to run a command as root or another user, as defined by the security policy such as sudoers. 265 | 266 | >>sum- This command is used to show the checksum and block counts for each each specified file on the command line. 267 | 268 | 269 | #t 270 | 271 | >>tac- This command concatenates and displays files in reverse. It simply prints each file to standard output, showing last line first. 272 | 273 | >>tail- Thiscommand is used to display the last lines (10 lines by default) of each file to standard output. If there more than one file, precede each with a header giving the file name. 274 | 275 | >>talk- This command is used to talk to another system/network user. To talk to a user on the same machine, use their login name, however, to talk to a user on another machine use ‘user@host’. 276 | 277 | >>tar- This command is a most powerful utility for archiving files in Linux. 278 | 279 | >>tee- This command is used to read from standard input and prints to standard output and files 280 | 281 | >>tree- The tree command is a tiny, cross-platform command-line program used to recursively list or display the content of a directory in a tree-like format. 282 | 283 | >>time- This command runs programs and summarizes system resource usage. 284 | 285 | >>top- This program displays all processes on a Linux system in regards to memory and CPU usage and provides a dynamic real-time view of a running system. 286 | 287 | >>touch- This command changes file timestamps, it can also be used to create a file 288 | 289 | >>tr- This command is a useful utility used to translate (change) or delete characters from stdin, and write the result to stdout or send to a file as follows. 290 | 291 | 292 | #u 293 | 294 | >>uname- This command displays system information such as operating system, network node hostname kernel name, version and release etc. Use the '-a' option to show all the system information: 295 | 296 | >>uniq- This command displays or omits repeated lines from input (or standard input). To indicate the number of occurrences of a line, use the '-c' option. 297 | 298 | >>uptime- This command shows how long the system has been running, number of logged on users and the system load averages. 299 | 300 | >>users- This command shows the user names of users currently logged in to the current host. 301 | 302 | 303 | #v 304 | 305 | >>vim/vi- This is a popular text editor on Unix-like operating systems. It can be used to edit all kinds of plain text and program files. 306 | 307 | 308 | #w 309 | 310 | >>w- This command displays system uptime, load averages and information about the users currently on the machine, and what they are doing (their processes) 311 | 312 | >>wall- This command is used to send/display a message to all users on the system 313 | 314 | >>watch- This command runs a program repeatedly while displaying its output on fullscreen. It can also be used to watch changes to a file/directory. 315 | 316 | >>wc- This command is used to display newline, word, and byte counts for each file specified, and a total for many files. 317 | 318 | >>wget- This command is a simple utility used to download files from the Web in a non-interactive (can work in the background) way. 319 | 320 | >>whatis- This command searches and shows a short or one-line manual page descriptions of the provided command name(s). 321 | 322 | >>which- This command displays the absolute path (pathnames) of the files (or possibly links) which would be executed in the current environment. 323 | 324 | >>who- This command shows information about users who are currently logged in. 325 | 326 | >>whereis- This command helps us locate the binary, source and manual files for commands. 327 | 328 | 329 | #x 330 | 331 | >>xargs- This command is a useful utility for reading items from the standard input, delimited by blanks (protected with double or single quotes or a backslash) or newlines, and executes the entered command. 332 | 333 | 334 | #y 335 | >>yes- This command is used to display a string repeatedly until when terminated or killed using [Ctrl + C] 336 | 337 | >>youtube-dl- It is a lightweight command-line program to download videos and also extract MP3 tracks from YouTube.com and a few more sites. 338 | 339 | 340 | #z 341 | 342 | >>zcmp/zdiff- These are minimal utilities used to compare compressed files. 343 | 344 | >>zip- It is a simple and easy-to-use utility used to package and compress (archive) files. 345 | 346 | >>zz- This command is an alias of the fasd commandline tool that offers quick access to files and directories in Linux. It is used to quickly and interactively cd into a previously accessed directory by selecting the directory number from the first field 347 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Linux Commands

2 |

Operating Linux becomes easy if you know the right commands

3 | 4 |

5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | A community-built repository which includes most of the basic command lines. 15 | 16 |

17 | 18 | ### Also, check out another repository accepting hacktoberfest PRs here at [Docker Commands](https://github.com/gandalf0079/Docker-commands) 19 | - It's empty right now. Populate it with Docker Commands 20 | #### What is this repository for? 21 | 22 | This is list of many useful basic linux command lines. 23 | 24 | #### Who can contribute for this repository? 25 | 26 | Anyone. Absolutely anyone can contribute to this repository. Please check the rules below before you make pull requests. 27 | 28 | #### CONTRIBUTION 29 | 30 | ##### How to contribute? 31 | 32 | - Add an issue to this repository stating the use of that command line. 33 | - Fork this repository and give a star. 34 | - Try to provide examples for that command line. 35 | - Once go through the raw file of `Basic_commands.md` to get the gist of formatting required. 36 | - Create a Pull request 37 | - Feel free to improve the README.md 38 | 39 | #### Rules 40 | ##### Please follow format used in `Basic_commands.md` 41 | - Please do not spam pull request for the sake of Hacktoberfest. 42 | - No duplicate entries. Please check if the command is existing before you submit. 43 | - Star this repository to show appreciation towards public efforts. 44 | 45 | 46 | --------------------------------------------------------------------------------