Linux Commands Cheat Sheet
Get the cheat sheet
The Linux operating system offers a multitude of commands, which can be overwhelming for beginners. This cheat sheet helps you get familiar with over 30 basic Linux command-line executables frequently used by developers. You’ll find easy-to-learn shortcuts and code examples to help you find your way around the Linux command line.
With the Linux Commands Cheat Sheet, you’ll learn basic commands for:
- Application and process management:
- Console and output management, working with data sent to stdout or displayed in a terminal window:
- Creating and exporting environment variables:
- Working with files and directories:
- Accessing command-line help documentation:
- Working with networks on and from a Linux computer:
- Process management:
- System control:
- User management:
With Red Hat Developer cheat sheets, you get essential information right at your fingertips so you can work faster and smarter. Easily learn new technologies and coding concepts and quickly find the answers you need.
sudo find <starting/directory> -name <file/directory name>
Finds a file or directory by name.
The following command finds a file named hostname starting from the root ( / ) directory of the computer’s filesystem. Note that the command starts with sudo in order to access files restricted to the root user:
$ sudo find / -name hostname /proc/sys/kernel/hostname /etc/hostname /var/lib/selinux/targeted/active/modules/100/hostname /usr/bin/hostname /usr/lib64/gettext/hostname /usr/share/licenses/hostname /usr/share/doc/hostname /usr/share/bash-completion/completions/hostname /usr/share/selinux/targeted/default/active/modules/100/hostname /usr/libexec/hostname
grep <search_expression> <input> $ less -N ~/.bashrc