On a Linux system, the need to find a string in a file can arise quite often. On the command line, the grep command has this function covered very well, but you’ll need to know the basics of how to use it. On GUI, most text editors also have the ability to search for a particular string.
filesystem
How to save and exit file using nano editor in Linux
In this tutorial, you will learn how to save a file in the Linux nano editor. The nano editor is one of the most popular ways to edit files via the command line on Linux systems. There are plenty of others, like vim and emacs, but nano is praised for its ease of use.
How to mount a remote filesystem over SSH with sshfs
SSH (Secure Shell) is a protocol used to establish an encrypted connection with a remote machine using a client-server model: the ssh server runs on the machine we want to access remotely, while a client is used on the machines from which we want to connect. Thanks to sshfs, we can use an existing SSH connection to mount a remote directory in a secure way, without using additional services like NFS or Samba.
How to extend the Thunar file manager with custom actions
Thunar is the file manager included in Xfce, a free and open source Desktop Environment which implements the traditional desktop metaphor, and has become the favorite of many users which switched to it when the GNOME project introduced the GNOME shell. Thunar is light on resources but doesn’t lack functionalities which can be extended further by creating custom actions.
How to partition USB drive in Linux
In order to access a USB drive on Linux, it needs to have one or more partitions on it. Since USB drives are usually relatively small, and only used for temporary storage or to easily transfer files, the vast majority of users will choose to configure just one partition that spans the entire USB disk. However, you can also logically separate the USB drive into different sections if you wanted to use multiple partitions.
/boot/efi Linux partition: What is, usage recommendations
The /boot/efi
partition is present on most Linux systems and is where the boot loaders (and sometimes kernel images and drivers) are stored for all of the installed operating systems on the disk. The system’s UEFI firmware will load these files upon system boot.
What is /etc directory in Linux
The Linux file system hierarchy was thoughtfully created and has undergone some careful changes since its inception. Linux users may have noticed a few directories that are always present on all systems, such as the /etc
directory and a slew of others that reside inside of root. Have you ever wondered what this directory is specifically for, and how it became such a staple for the Linux operating system? In this tutorial, you will learn what the /etc
directory is used for on a Linux system.
How to partition a drive on Linux
Every hard disk, in order to be accessible under Linux, must have at least one partition on it. A partition is a way to logically separate different sections of a disk. For example, a 4 TB hard drive could have four different 1 TB partitions, and all would appear as separate storage systems under the operating system. Alternatively, a hard disk could simply contain a single partition that spans the entire volume. The configuration is entirely up to the user.
How to backup and restore an xfs filesystem using xfsdump and xfsrestore
XFS is a journaled filesystem originally developed by Silicon Graphics in 1993; it was released under the GPL license in the year 2000 and ported to the Linux kernel in 2001. Due to its high scalability and performances, XFS became the default filesystem in recent versions of Red Hat Enterprise Linux and its clones.
How to add new disk to existing Linux system
When you are adding a new disk to an existing Linux system, you will need to format and partition it, add a file system to it, and then mount the disk to some path where you plan to access it from. This might sound complex or like a lot of steps, but it really only takes a few minutes. The following tutorial will make it very easy.
How to keep configuration files under version control with Etckeeper
On Linux-based operating system the /etc directory is used to hold global configuration files for applications and services. A good set of configurations is really important for a good working system, so being able to keep track of changes and quickly revert them, in case something go wrong, is crucial. Etckeeper helps us achieve this goal keeping configuration files under version control.
How to list and manage files attributes on Linux
When using Linux we have many ways to manage access to resources: the most basic one is by setting the appropriate UGO/RWX permissions on files and directories. In some occasions we may also want to make use of the setuid, the setgid and the sticky bit. Furthermore, we can use ACLs (Access Control List) in order to achieve an higher level of granularity or implement Mandatory Access Control security such those based SELinux or AppArmor.
In addition to the strategies mentioned above, on most filesystems we can manipulate a set of “attributes” in order, for example, to make a file immutable.