Linux commonly uses base64 to encode and decode data. This method of encoding provides a reliable way for data to be transmitted and stored. The encoding process will convert binary data to ASCII characters, making it usable by a variety of services (such as OpenSSL) that require readable ASCII character transmission as opposed to binary. Afterwards, the data can be decoded back to binary data. In this tutorial, you will see how to use the base64
command to decode and encode data on a Linux system.
terminal
How to say YES to ALL with cp command
The cp command is used to copy files and directories on a Linux system. If a user tries to copy a file over to a location that already contains the same file name, the default behavior of cp
is to overwrite the destination file with the source file. However, on some Linux systems, this behavior can be configured differently, and the user might see a prompt to confirm overwriting in their terminal. When copying many files, this prompt can get repetitive and annoying to deal with. In this tutorial, you will learn how to say YES to ALL with the cp
command when trying to copy files via the Linux command line.
How to kill a process by name
When you need to quickly or forcibly close a running process on a Linux system, many users will try to determine the process ID and then kill a process by its ID. While this works fine, it is sometimes easier or more convenient to kill a process by name. This way, we get to skip the step of looking up the process ID, and let our terminal do the work for us.
How to kill process by ID
Everything that is currently running on your Linux system is a process. Some processes are meant to run in the background (application updates, for example), so you may not be readily aware of their existence. And other processes (a web browser, for example) are very apparent, and get started or stopped by the user on a constant basis. All of these processes are assigned an ID number, called PID or “Process ID”, and can be referenced in various situations, including killing a running process via the process ID.
How to echo environment variable on Linux
Environment variables contain data about the current system configuration. These variables are mostly referenced by scripts and system programs that need some information on the current configuration in order to adapt to various scenarios. For example, a script might check an environment variable to see what language is set on the computer, and then output prompts in the target language. One of the most commonly accessed environment variables is the PATH environment variable.
How to join line on Linux
When working with text on the command line, it is sometimes useful to join multiple lines together. Rather than going through text files and manually shifting lines around to be on the same line, our Linux system provides us with multiple tools to simplify this task for us. Log files are a good example of text that is usually split up onto multiple lines, and sometimes it is easier to visualize the data when some lines are joined together. In this tutorial, we will show you several ways to join lines of a file together on a Linux system.
How to check what shell I’m using on Linux
The shell on a Linux system is the layer that interprets the commands being executed by the user, and translates them into a language that the operating system can understand. The Bash shell is the default one in Linux, and typically what all users become familiar with first. But there are a lot of other shells that can be used, too; like sh, zsh, ksh, csh, and tcsh, to name a few.
How to open file explorer from terminal on Linux
Have you ever been in the middle of using your command line terminal, and suddenly needed to open the file explorer? In some cases, it can be easier or more convenient to visualize the contents of a directory from a graphical file explorer, rather than using the ls command or others to sift through the files. Fortunately, Linux gives us an easy way to open a file explorer and have it navigate directly to the directory we are currently viewing in the terminal.
How to quit telnet
The telnet utility, a once common protocol that graced the terminal of every system administrator and power user, was a precursor for the SSH protocol. Since telnet sends all data, including usernames and passwords, over the network in clear text, it is not often used anymore. Despite the other protocols that have come to replace it, telnet remains an ideal utility to test the connection to a certain port of a device, and can be handy in other niche scenarios, or even send an email.
How to paste into terminal
Linux users that are new to using the command line terminal will quickly realize that the typical and well known Ctrl + C
and Ctrl + V
keyboard shortcuts do not work for copying and pasting. Instead, Ctrl + C
will interrupt a running command, so users must quickly make new habits and learn the proper way to copy and paste into the terminal. In this tutorial, we will show you all the ways to paste your clipboard into the terminal on a Linux system. We will also go over a few ceveats that you may need to know.
How to pipe output to a file on Linux
When using the Bash shell on a Linux system, we can send the output of a command to somewhere else, by passing it to another command or a file, for example. This is called Bash shell redirection. It is useful in many different scenarios, and is one of the most basic and essential components of learning to use the Bash shell and Bash scripting.
How to scroll up in terminal on Linux
The command line is the most powerful feature of a Linux system, as it allows users to quickly accomplish tasks that would usually take longer using a GUI. In order to be more efficient with using the command line terminal, it is important to know how to navigate around it more quickly. In this tutorial, we will show you how to scroll up in the terminal on a Linux system. This will work for systems that are not using a GUI, such as when logged into an SSH session.