4 Ways to use the Linux alias Command

Consider the following command that prints the top ten directories that take up the most disk space:

# du -h /path/to/directory | sort -hr | head -n 10

This is a frequent check, and you can imagine the effort required to type this command in the terminal and scripts. Repetitively typing or copying the same command lowers productivity and introduces a hassle you can easily avoid with the alias command.

By making aliases for the commands you use frequently, you can save yourself a couple of hours every month. Similar to personalized shortcuts, aliases refer to a command (or group of commands) that can be used with or without personalized parameters.

You are likely utilizing aliases on your Linux system without being aware of the fact.

This article will introduce you to the alias command. We’ll show you how to create command aliases with the Linux alias command. Next, we’ll go into the details of making command aliases permanent on your system. Finally, we’ll show you how to remove command aliases.

But first, let’s start with a short introduction to the idea of command aliases in Linux.

[mai mult...]

How to create Disk partitions using parted and fdisk

Creating or resizing disk partitions is an important activity when installing any Linux distribution. Partitioning your system’s disk allows you to divide it into separate sections, each functioning as its own independent storage unit.

It is also a crucial system administration task where the admin optimizes the usage of storage space by creating partitions that the system OS, applications, and users can use without worrying about running out of storage or unused disk space. In a multi-OS environment, you need disk partitions to allocate space to each OS on the disk. In this case, disk partitioning is an essential activity for ensuring system performance and supporting user applications.

[mai mult...]

How to Kill a process in Linux | Kill Command

kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process that terminates the process. If the user doesn’t specify any signal that is to be sent along with the kill command, then a default TERM signal is sent that terminates the process.

[mai mult...]

Ls Command in Linux

ls is one of the basic commands that any Linux user should know.

The ls command lists files and directories within the file system, and shows detailed information about them. It is a part of the GNU core utilities package which is installed on all Linux distributions.

[mai mult...]

Checking your Linux Version

The term “Linux version” in the context of Linux operating systems typically refers to the specific distribution and version of the Linux kernel that is running on a given system.

For those you don’t know, the Linux kernel is the foundation of the Linux operating system, providing the fundamental services and functionality required to run applications and manage system resources. Each Linux distribution contains a specific version of the Linux kernel and a set of tools and utilities designed to work with that kernel version. Different Linux distributions may also include different packages, libraries, and software applications.

[mai mult...]

How to Unzip Files in Linux

Zip is the most widely used archive file format that supports lossless data compression. A zip file is a data container containing one or more compressed files or directories, which can later be extracted to restore the original files. Zip also offers a range of advanced features. You can password-protect your ZIP archives to keep your data safe or split large files into smaller parts to make them more manageable.

[mai mult...]