Linux

Server Web 146 Solutii

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...]