Linux Articles

Page 34 of 134

How to Configure PAM to Audit Logging Shell User Activity?

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 911 Views

In today's digital age, security is of utmost importance. The rise of cyber threats and data breaches has shown that no system is completely safe. System administrators and IT professionals must take proactive measures to protect their systems and data. One such measure is the use of Pluggable Authentication Modules (PAM) for user authentication. PAM is a powerful tool that allows system administrators to customize the authentication process for their systems. It enables the use of multiple authentication methods, such as passwords, tokens, and biometrics, among others. This flexibility makes it easier for administrators to manage access controls and ...

Read More

How to Configure Postfix and Dovecot with Virtual Domain Users in Linux?

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 2K+ Views

Configuring Postfix and Dovecot with virtual domain users is an essential process for anyone running a Linux-based email server. These two software applications work together to handle incoming and outgoing emails. Postfix is the mail transfer agent (MTA) responsible for routing and delivering email messages, while Dovecot is the mail delivery agent (MDA) that delivers incoming emails to users' mailboxes and allows clients to retrieve them. This guide provides a step-by-step approach to configure both services for virtual domain users, allowing you to host multiple email domains on a single server without creating system users for each email account. ...

Read More

Copying SSH Keys to different Linux Machine

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 715 Views

When working with multiple Linux machines, you often need to copy your SSH keys between systems to enable password-less authentication. This process involves securely transferring your public key from one machine to another and properly configuring the target machine to accept your key for authentication. SSH keys consist of a private key (kept secret on your local machine) and a public key (shared with remote machines). The public key is added to the target machine's authorized_keys file, allowing secure authentication without passwords. SSH Key Structure On your local machine, SSH keys are stored in the .ssh directory ...

Read More

Find last Directory or file from a given path

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 845 Views

Extracting the last directory or file name from a given path is a common task in shell scripting and Linux command-line operations. For example, from the path /tmp/dir/target, we want to extract target as the final component. While this seems straightforward, there are several edge cases that can cause simple solutions to fail, such as trailing slashes, root directory paths, and filenames containing spaces. Common Solutions Since Linux filesystems use forward slashes (/) as path separators and don't allow slashes in filenames, we can treat the path as slash-separated components and extract the last non-empty element. ...

Read More

Delete empty files and directories in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 9K+ Views

Empty files and directories in Linux systems don't consume significant disk space, but removing them periodically helps maintain system cleanliness and organization. This tutorial covers various methods to delete empty files and directories using the powerful find command in Linux systems. Delete Empty Files in a Directory The find command with specific options can locate and remove all empty files in a directory structure. The basic syntax combines type filtering, empty file detection, and deletion in one command. find . -type f -empty -print -delete Let's examine this command with a practical example. Consider ...

Read More

How To Work With Ansible Variables And Facts?

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 602 Views

Ansible is a widely-used open-source tool that helps in automating software provisioning, configuration management, and application deployment. One of its powerful features is the ability to use variables and facts, which can simplify your playbooks and tasks, and allow you to design more dynamic, flexible, and reusable automation scripts. In this article, we'll dive into how to work with Ansible variables and facts, showcasing several examples and their corresponding output. Understanding Ansible Variables Variables in Ansible allow for the storage and manipulation of values, which can be utilized across multiple tasks or even different playbooks. Variables can ...

Read More

Avoiding unwanted directory while using zip

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 280 Views

ZIP files are one of the most widely supported compression formats, especially when sharing files across different operating systems like Linux, Windows, and Mac. However, when creating ZIP archives from the command line, we often encounter the problem of unwanted directory structures that make the extracted files difficult to navigate. This article explores techniques to create clean ZIP archives without unnecessary parent directories, using Linux command-line tools and bash built-in commands like pushd and popd. The Problem with Full Path Compression When using the zip command with the -r (recursive) option, the entire directory path gets included ...

Read More

Implement shell file protection in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 474 Views

Shell file protection in Linux provides multiple layers of security to prevent accidental file overwrites and unauthorized access. This includes both filesystem permissions and built-in shell safeguards like the noclobber option that prevents redirection operators from overwriting existing files. Besides the Linux file permission mechanisms that help us keep our files safe from misuse, most Linux shells have built-in safeguards against accidental file overwrite. We'll cover the key protection mechanisms available in common shells. Protecting Files With noclobber All POSIX shell implementations support the noclobber option. When enabled, the shell prevents output redirection operators from overwriting existing ...

Read More

Difference Between .a and .so files

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 4K+ Views

A programmer may want to write three different programs. However, he realizes that some of the functionality needed for each program could be shared among them. Therefore, he decides to create a library containing these shared features. A library is basically a collection of code and data that other people can use. On Linux, archives (with the .a file extension) contain compiled object code, whereas shared objects (.so files) contain code that can be dynamically loaded at runtime. Here, we'll examine how software runs under Linux and the purposes of the library and archive files. We'll also see ...

Read More

20 Things to Do After Installing Ubuntu 22.04 LTS (Focal Fossa)

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 51K+ Views

Ubuntu 22.04 LTS (Jammy Jellyfish) is the latest long-term support release of Ubuntu, which means that it will be supported for five years with security updates and bug fixes. If you have just installed Ubuntu 22.04 LTS, congratulations! You are now ready to explore the world of Ubuntu and take advantage of its many features and tools. In this article, we will discuss 20 essential things you can do after installing Ubuntu 22.04 LTS to optimize your new operating system. These include updating your system, customizing your desktop, installing essential software, configuring security settings, and more. 1. Update ...

Read More
Showing 331–340 of 1,338 articles
« Prev 1 32 33 34 35 36 134 Next »
Advertisements