Bash base64 decode and encode on Linux

Bash base64 decode and encode on Linux

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.

Read more

How to say YES to ALL with cp command

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.

Read more

Linux shutdown commands explained

Linux shutdown commands explained

New users are often surprised by the number of commands that can be used to shut down a Linux system. Thanks to the flexibility of Linux and its storied history, there is almost always more than one – or more than a few – ways to accomplish the same task. Although Linux is always giving users plenty of choices on how to operate their system, one method usually proves better for certain scenarios, and all come with their pros and cons.

Read more

How to ZIP file with password on Linux

How to ZIP file with password on Linux

If you have one or more files that you need to send to a friend or store for a long time, compressing the files into a .zip archive is a good way to save on space and combine all files into a single object. If you need to keep the file contents private, for fear that they could be intercepted by the wrong party, or that someone could try to access them on your own system, then it is possible to add a password to your zip file. In this tutorial, you will learn how to zip files and add a password to your zip archive on a Linux system.

Read more

How to kill process by ID

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.

Read more

How to echo environment variable on Linux

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.

Read more

How to join line on Linux

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.

Read more

How to open file explorer from terminal on Linux

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.

Read more

How to quit telnet

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.

Read more