Latest stories

How to change your forgotten root password on CentOS 7

H

I’m not used to forget things, especially important ones, such as passwords. But unfortunately, such things can happen to anyone – even to me. And I’ve been to it recently: I’ve changed the password for a CentOS 7 system just before I went on vacation with a new password, designed by another algorithm than the one I have been using for years and years, but after a short...

Linux Documentation: Locating, Accessing, and Using it

L

We often have to find a solution to a Linux problem quickly – if we do not have access to the internet, or we need to solve the problem in a very short time. Let’s suppose you’ve just decided to opt out of your shared hosting and you’ve got your first VPS, connected to SSH, and you started configuring it. Below are the ways you can access all the documentation that your...

Linux files: changing the attributes with the chattr command

L

Linux file systems support some additional attributes for files, attributes that can be assigned or changed using the chattr command. With chattr we can do the following: • do not change the attribute that points to a file: if we set attribute A, Linux will not update the date when we accessed a specific file. This can reduce disk access time, which in particular can save laptop battery life (or...

Managing Links in Linux – ln Command

M

In Linux, a link is a way to assign multiple identities to a file, similar to Windows shortcuts. There are some reasons why Linux uses the links: • it helps files to become more accessible; • to give commands/files more names; • to allow programs using the same files to access them from different places. There are two types of links: hard links and symbolic links. Hard links are obtained by...

Manipulate files in Linux: rm command

M

The rm command (abridged from remove) deletes a file or a directory. The syntax of this command is simple: rm [options] file Brief description of the most used options: –f – will automatically respond with y to all confirmations. It deletes files immediately without confirmation; if both -f and -i occur, the last one that is used in the terminal is taken into account by rm. Deleting a...

Useradd command – adding users to Linux

U

How often we add new users to a Linux system depends on the nature of the system we use: it can be a personal computer, where we rarely make changes, or a Linux server with many users. This article describes how to add a new user to a Linux system using the useradd command. The basic syntax of the useradd command is: useradd [-c comment] [-d home-dir] [-e expires-date] [-f inactive-days] [-g...

Userdel command – deleting accounts in Linux

U

Deleting Linux user accounts is easy. Use the userdel command to delete that user’s entry from the /etc/passwd and /etc/shadow files. The basic syntax of this command: userdel [options] username The userdel command only has 3 parameters: Delete user files The -r or –remove parameter tells the system to delete all the user’s emails, the files in the user’s home directory...

Installing and setting up Grafana in CentOS 7

I

Grafana is a time series analytics tool to measure and visualize a whole array of metrics. The most common usage is in datacenter and enterprise environments, but it can also be used for industrial sensors, home automation, weather and deployment control. An open source software, Grafana is currently the leading tool for sysadmins and devops that want to integrate an extremely versatile analytics...

How to install Prometheus in CentOS 7

H

Prometheus is a server monitoring service. It collects metrics (values) from configured target servers at certain preset intervals, evaluates certain rules and expressions, displays results, and can trigger alerts when certain conditions become true (excessive CPU usage, system run out of memory, run out of space on disk, etc.). Prometheus raises, however, monitoring on a much more complex level...

How to install and use Htop – a process monitoring application on a Linux system

H

Htop is an interactive and dynamic application for real-time process monitoring on Linux/Unix systems, being the alternative to the familiar top command, pre-installed on most Linux distributions. Htop has several funtions and features that are not available with the top command: • The htop can be scrolled vertically to view all processes, but also horizontally for full view of the control panel...

Recent Posts

Archives

Categories