A bash function is a way to encapsulate some functionality that you foresee yourself reusing repeatedly. Last week, I wrote about using a bash alias for complex commands, and we saw that functions could be used similarly for commands that require dynamic arguments instead of static ones. But we can use functions for a lot […]
Category: Linux Command Line
Bash For Loop: Everything You Need To Know
What is a bash For Loop? As a Linux System Administrator there will come times where a task can be made much simpler and faster to complete with the use of For Loops in bash. A bash For Loop is a script or statement where you have a set of items (i.e a list of […]
Bashrc vs. bash_profile: A Complete Guide
What is the .bashrc file? Whenever a bash shell session starts it will reference bash configuration files such as .bashrc or .bash_profile and will load a user into their initial command prompt based off scripts placed in those files. With the .bashrc file you’re able to customize aspects of a users bash sessions by adding […]
How to Use a Bash Alias in Linux
When you first start using Linux, you’ll need only a handful of commands. As you gain experience, you learn more of them, but the complexity of the commands increases. Commands like awk, df, git, etc., all have a huge range of options and endless combinations of them. Every Linux system administrator and every server has […]
How To Exit Tmux: The Complete Guide
Linux Administrators at times will need to open multiple terminal sessions while logged into a server in order to multi-task between different projects/tasks. Many Linux users are familiar with the ‘screen’ command line utility to accomplish this but in newer versions of RHEL and other distributions we are seeing Tmux becoming more popular in the […]
The Dmseg Command: Everything You Need To Know
What is the kernel ring buffer? The Linux kernel is the “brain” and core piece of the Linux operating system and the kernel’s main function is to serve as an interface between the hardware and software components of a Linux computer system. During the boot cycle of a Linux system various information is displayed within […]
The Modprobe Command: Everything You Need To Know
What is the Linux kernel? The kernel is the “brain” and core piece of the Linux operating system and the kernel’s functionality is to serve as an interface for interaction between system software and hardware. Linux kernel updates are released periodically to improve security, fix issues discovered in a previous release, provide new features, and […]
How to Set Environment Variables in zsh
Zsh is a shell program like bash. While it has many improvements and features that bash doesn’t have – like autocompletion and improved history navigation – bash is still the standard shell everyone is used to. You can mostly run bash scripts in zsh without any change since it’s designed to be compatible. Regarding setting […]
How to Use Docker Run –entrypoint
Docker is a way for developers to package applications with all their dependencies and configurations into a single image that can run on any setup, making it easy to port applications across machines in a consistent manner that removes all complaints such as “it works on my machine”. These images or containers are designed to […]
The Watch Command: Everything You Need To Know
What is watch? The Linux watch command line utility is installed by default and it allows for real time system monitoring on the command line interface. This command allows for you to monitor command output in regular intervals and during each interval the output of your command refreshes. In the past I’ve personally used the […]
