Search Results for: linux directory structure

What are inodes in linux?

An inode is a data structure that contains metadata about a file. When the file system stores a new file on the hard disk, it stores not only the contents (data) of the file, but also extra properties like the name of the file, the creation date, its permissions, the owner of the file, and more. All this information (except the name of the file and the contents of the file) is stored in the inode of the file. The ls -l command will display some of the inode contents, as seen in this screenshot #ls -ld <directory_name> The inode table contains all of the inodes and is created when you create the file system (with mkfs). You can use the df -i command to see how many inodes are used and free on mounted file systems. #df -i In the df -i screenshot above you can see the inode usage for several mounted file systems. You don’t see numbers for /dev/sda2 because it is a fat file system. inode number Inode number is also known as index number. It is a unique number assigned to files and directories while it is created. The inode number will be unique to entire filesystem. You can see the inode numbers with the ls -li command. #ls -li These three files were created one after the other and got three different inodes...

Read More

How to install Terraform and create your first infrastructure in AWS?

How to Install Terraform Terraform must first be installed on your machine. Terraform is distributed as a binary package for all supported platforms and architecture. To install Terraform, find the appropriate package for your system and download it. Terraform is packaged in a zip archive. You need to unzip it and keep it in a location. Unzip the package. Let’s create a directory terraform and save the unzipped file inside the folder. cd /home/ubuntu mkdir terraform wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip unzip terraform_0.11.8_linux_amd64.zip Once we have the terraform file, we will set its path in .bashrc file.  Add a line to the file: PATH=$PATH:/home/ubuntu/terraform. vi .bashrc PATH=$PATH:/home/ubuntu/terraform To verify the installation, we have to run the command terraform from anywhere on the machine. We will go through all these commands at the latter part of this blog. terraform BUILD INFRASTRUCTURE Once we have Terraform installed, we will create the infrastructure. For the cloud provider, we are going to use AWS here. We can use any other cloud vendors such as Azure, Google Cloud Platform, Digital Ocean, etc. If you don’t have AWS account, create one. We will use the resources which are under free-tier. The set of files used to describe infrastructure is called Terraform configurations. We are going to write our first configuration to launch infrastructure in AWS. Let’s create a directory for our project and create a terraform file with all our configurations. mkdir...

Read More

Enabling passwordless authentication for chrooted sftp users in Linux

Introduction In one of our previous articles we demonstrated how to setup chrooted sftp accounts. You may have certain application users which need to connect to the sftp server to transfer files in an automated manner without manual intervention. An enterprise infrastructure may comprise of many scripts as well which might need to transfer files to the sftp server in an automated fashion without having the need to enter credentials. Configuration of password less authentication for chrooted sftp user accounts is similar to that of ssh user accounts but involves an additional step. In this article we will demonstrate how to setup passwordless authentication for a chrooted sftp user account. In order to make this post easy to follow for our readers and maintain continuity we will setup passwordless sftp authentication for the chrooted sftp user named sahil which we created in our earlier article where we explained the setting up of chrooted sftp users. Step 1: Ensure destination user credentials are working Before we setup passwordless authentication let’s first try to login to the server as the user sahil with it’s password to make sure that the user account is working and has been setup correctly. [root@linuxnix ~]# sftp sahil@linuxnix Connecting to linuxnix... sahil@linuxnix's password: sftp> ls sftp> pwd Remote working directory: /myhome sftp> quit [root@linuxnix ~]# Step 2: Setup ssh keys for the source user For the purpose...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.