List and resume stopped jobs in the background: bgīring the most recently suspended job to the foreground: fgīring a particular job to the foreground: fg Terminate all processes labelled “proc”: killall Terminate a process under a specific name: pkill Terminate a Linux process under a given ID: kill Show processes in a tree-like diagram: pstreeĭisplay a memory usage map of processes: pmap Install software from source code: tar zxvf Install a package using the APT package manager: apt install Install a package using the DNF package manager: dnf install Install a package using the YUM package manager: yum install Show package information and summary: yum info List all installed packages with yum: yum list installedįind a package by a related keyword: yum search Note: If you want to learn more about users and groups, take a look at our article on how to add a user to a group in Linux. Print all lines matching a pattern in a file: awk ' ' List number of lines/words/characters in each file in a directory with the xargs command: ls | xargs wcĬut a section of a file and print the result to standard output: cut -d Ĭut a section of piped data and print the result to standard output: | cut -d Show the number of words, lines, and bytes in a file using wc: wc Show the contents of a file: more Īppend file contents to another file: cat > ĭisplay the first 10 lines of a file with head command: head Rename to with the command: mv Ĭreate a symbolic link to a file: ln -s /path/to/ Ĭreate a new file using touch: touch Recursively copy the contents of one file to a second file: cp -r Recursively remove a directory without requiring confirmation: rm -rf Ĭopy the contents of one file to another file: cp Show directory you are currently working in: pwdĬreate a new directory: mkdir List all files ( shows hidden files): ls -a Learn about them in our list of dangerous Linux commands. Note: Some commands are not recommended to use. See files larger than a specified size in a folder: find -size List names that begin with a specified character in a specified location by using the find command: find -name Recursively search for a pattern in a directory: grep -r įind all files and directories related to a particular name: locate Search for a specific pattern in a file with grep: grep Run a disk check on an unmounted disk or partition: fsck Searching Test for unreadable blocks on device/disk: badblocks -s /dev/ Show hardware information from the BIOS: dmidecodeĭisplay disk data information: hdparm -i /dev/diskĬonduct a read-speed test on device/disk: hdparm -tT /dev/ Show PCI devices in a tree-like diagram: lspci -tvĭisplay USB devices in a tree-like diagram: lsusb -tv See information about block devices: lsblk List hardware configuration information: lshw Hardware Informationĭisplay free and used memory with: free -h The commands found in the downloadable cheat sheet are listed below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |