CloudLinux - Knowledge Base Archives - Hivelocity Hosting https://www.hivelocity.net/kb/tag/cloudlinux/ Dedicated Servers, Private Cloud & Colocation Fri, 23 Feb 2024 21:25:30 +0000 en-US hourly 1 https://wordpress.org/?v=6.6 Skeleton Directories in Linux https://www.hivelocity.net/kb/skeleton-directories-in-linux/ Fri, 23 Feb 2024 21:25:30 +0000 https://www.hivelocity.net/?post_type=hv_knowledgebase&p=31422 Skeleton directories in a Linux OS serves as the foundation for a new user’s home directory when created using the useradd command. It automatically copies files and directories to the user’s home directory. These files establish initial settings and environment, including the bash profile, aliases, and bookmarks. In this article, Skeleton Directories in Linux, we …

Skeleton Directories in Linux Read More »

The post Skeleton Directories in Linux appeared first on Hivelocity Hosting.

]]>
Skeleton directories in a Linux OS serves as the foundation for a new user’s home directory when created using the useradd command. It automatically copies files and directories to the user’s home directory. These files establish initial settings and environment, including the bash profile, aliases, and bookmarks.

In this article, Skeleton Directories in Linux, we will review each of the parameters and directories involved with the skeleton directory. 

Skeleton Directory Overview in A Linux System

The skeleton directory (/etc/skel) provides the backbone or skeleton of what any new account /home/<username> directory would look like. For example, if there are 3 directories in /etc/skel, then those directories would populate upon each and every new account that is being created.

Skeleton Directory and the Creation of Directories Within

  1. As shown above, we are viewing the directory with ls /etc/skel which shows no directories within.
  2. Create the required directories with the mkdir command, “Documents”, “Videos”, and “Downloads”.
  3. Use the ls command to verify that the newly created directories are present.
  4. When creating a new user, such as ‘pascal’ using the command useradd pascal, the user’s home directory will be located at /home/pascal/.
  5. View the home directory of the new user using ls /home/pascal in which the new directories will appear.
Viewing the New Directories Created in the /etc/skel Directory and How They Populate for New User Accounts
Viewing the New Directories Created in the /etc/skel Directory and How They Populate for New User Accounts

As seen in this article, skeleton directories are a useful tool for organizing the structure and layout of a project or user. Skeleton directories can help developers and collaborators to understand the purpose and function of each component, as well as to avoid duplication and confusion. Skeleton directories can also facilitate the automation and testing of the project, by making it easier to locate and execute the relevant scripts and commands.

The post Skeleton Directories in Linux appeared first on Hivelocity Hosting.

]]>
Handling Directories in Linux https://www.hivelocity.net/kb/handling-directories-in-linux/ Tue, 09 Jan 2024 22:55:22 +0000 https://www.hivelocity.net/?post_type=hv_knowledgebase&p=29213 Directories in Linux are folders that contain files and other directories. They are organized in a hierarchical structure, starting from the root directory (/) that contains all other directories and files. In this tutorial, we will cover handling directories in Linux and explain how to create, rename, delete, and move through directories. — — Handling …

Handling Directories in Linux Read More »

The post Handling Directories in Linux appeared first on Hivelocity Hosting.

]]>
Directories in Linux are folders that contain files and other directories. They are organized in a hierarchical structure, starting from the root directory (/) that contains all other directories and files. In this tutorial, we will cover handling directories in Linux and explain how to create, rename, delete, and move through directories.

Handling directories in Linux – Absolute and Relative Paths

When traversing directories in Linux, there are two ways to type a file or directory path, an absolute path and relative path.

An absolute path is the specific location irrespective of the current working directory or combined paths and are written with reference to the root directory, starting with a forward slash /. Example of using absolute path, “cd /usr/bin

handling directories in Linux - Absolute path

A relative path is the path relative to the current working directory using period and double periods, indicating current and parent directories. Example of using a relative path when the current working directory is /usr/, “cd bin

relative path - directories in Linux

Both types will take you to the same place but take different steps and criterias to do so, when you handling directories in Linux.

How to Create a Directory 

To create a directory, we will use the mkdir command to do so. Follow the steps below to proceed. 

1. To create a directory in Linux, you can use the mkdir command followed by the name of the directory, as shown below.

The command will create a directory in the root directory (/) called “Net_Growth_21”.

mkdir /Net_Growth_21 which will create a directory in / with that name.

creating directory in linux

2. Creating a directory in a different directory, the full path can be given with the command.

mkdir /guide/Net_Growth_21 which will create the directory in a directory, /guide/, as shown below.

creating directory/guide

How to Navigate and List Directories in Linux

To navigate through directories, we will be using the following commands, pwd, ls, and cd.

1. The pwd command will print the working directory which you are currently working in.

Command to print working directory in Linux

2. The ls command will list all items in the directory you are currently working in.

List the items in directory

Another good option with ls is ls -lh which will present the items size and in a list form.

Present items in list form

3. The cd command is used to move through directories.

    1. Using cd . will navigate to the current directory as the period (.) is used to represent the current directory.
    2. Using cd .. will navigate one directory above the current directory.
    3. move through directoriesUsing cd ~ will take you to the home directory of the currently logged user. Two examples are listed below for root and psuissa users.


How to Move a Directory in Linux

If you’re trying to move a directory in Linux from one location to another, just follow these 4 steps:

1. To move a directory in Linux, you can use the mv command followed by the source and destination directories, as shown below.

mv [source directory] [destination directory]

 

2. So, if you wanted to move /directory1 into a second directory name /directory2, you would use the following command:

mv /directory1 /directory2

How to move a directories in Linux

Note: If no “/directory2” exists, /directory1 will be renamed as “/directory2”, essentially “moving” it into a newly created directory, otherwise, all content from /directory1 will move to /directory2.

 

3. This can also be done for multiple files and directories at once. Let’s say you have 3 files (File1, File2, and File3), and you’d like to move all them into /Directory1. Simply list out all your sources before your destination, and Linux will automatically move all these files at once.

mv file1.txt file2.txt file3.txt /home/directory1

How to move a directories in Linux

4. Keep in mind that in order to move files and directories, a user must have permissions allowing them to modify both the source and destination directories. Otherwise, an error will occur and permission will be denied.

 

How to Copy a Directory in Linux

If you’re trying to make a copy of an existing directory, just follow these 4 steps:

1. To copy a directory or file in linux, just use the copy command followed by the Source (the directory you’re copying), and the Destination (the place you’re copying it to):

cp -R [Source] [Destination]

 

2. to make a copy of /directory1 and place it inside of /directory2, you would use the command:

cp -R /directory1 /directory2

How to copy a directory in Linux

*Note: If no “/directory2” exists, a new directory will be created, with that name, and containing the contents of /Directory1.

 

3. Like moving files, it is possible to copy multiple files into a single directory by listing out multiple filenames for sources, followed by a single destination. For example:

cp -R file1.txt file2.txt file3.txt /directory1

Which would copy file1, file2, and file3 into /directory1.

How to copy a directory in Linux

4. Additionally, if you wanted to copy the entire contents of /Directory1 into /Directory2 (duplicating the files inside the folder but not the folder itself), you can do so by adding ” /* ” after the source directory. For example:

cp – R /directory1/* /directory2

This would create copies of all the files located in /directory1, placing duplicates of its content into /directory2, but not duplicating the actual directory itself.

How to copy a directory in Linux

How to Rename a Directory in Linux

If you need to rename an existing directory in Linux to something new, just follow these 2 steps:

 

1. Interestingly, due to the way Linux’s file structures work, moving a file and renaming a file are actually the same action. This is because when you’re “moving” a file in Linux, you’re really “renaming” its file path: giving it a new name but also a new location in your system’s structure.

mv [Source Directory] [Destination Directory]

So, to rename /directory1 to /directory_new, you would use the command:

mv /directory1 /directory_new

If “/directory_new” already exists, then this command will move the contents of /directory1 to /directory_new. However, if “/directory_new” does NOT already exist, this command will rename /directory1 to /directory_new.

Renaming a directory in linux

The post Handling Directories in Linux appeared first on Hivelocity Hosting.

]]>
What is CloudLinux and How Does It Help Shared Hosting? https://www.hivelocity.net/kb/what-is-cloudlinux-and-how-does-it-help-shared-hosting/ Wed, 06 May 2015 19:59:25 +0000 https://www.hivelocity.net/?post_type=hv_knowledgebase&p=11894 What is CloudLinux? CloudLinux is a linux based operating system designed to give shared hosting providers a more stable and secure OS. Essentially a set of kernel modifications to the Linux distribution, CloudLinux implements features to enable system administrators to take fine-grained control of their server’s resource usage. By isolating users, CloudLinux helps ensure that …

What is CloudLinux and How Does It Help Shared Hosting? Read More »

The post What is CloudLinux and How Does It Help Shared Hosting? appeared first on Hivelocity Hosting.

]]>
What is CloudLinux?

CloudLinux is a linux based operating system designed to give shared hosting providers a more stable and secure OS. Essentially a set of kernel modifications to the Linux distribution, CloudLinux implements features to enable system administrators to take fine-grained control of their server’s resource usage. By isolating users, CloudLinux helps ensure that problems with one account don’t degrade the service for others.

CloudLinux virtualizes user accounts using a feature called LVE (LightWeight Virtual Environment). Each LVE is allotted a certain amount of resources (memory, CPU, etc.) which are separated from the server’s total resources.

If a particular account receives a sudden increase in traffic or begins to use a lot of CPU or memory, rather than slowing the entire server and possibly causing a failure, only that particular LVE will slow down.

 

How Does CloudLinux Help Shared Hosting Environments?

A shared hosting environment is one where hundreds of website accounts are hosted on a single server, sharing the server’s resources equally.

In a typical shared hosting environment, the server admin has limited control over individual website accounts’ server resource usage. If one website account is using an unfair amount of resources (e.g. due to being under a DDoS attack, poorly written script, increase in traffic, etc.), the entire server would become slow or go down completely, affecting all other customers on the server as well.

In traditional hosting, we can not set a limit for RAM, CPU, and other resource usage for a particular website account. Finding problematic websites is a time consuming job and fixing such issues sometimes requires suspension of the website accounts. This can easily lead to unsatisfied customers which can adversely affect your business.

What Happens When Issues Occur in a CloudLinux Hosting Environment?

In CloudLinux based shared hosting environments, once a website account reaches its limit of set resources, the site will begin to slow down. The website account consuming too many resources will temporarily stop working until resource usage returns to normal. Meanwhile, other website accounts on the server will continue to run normally.

In CloudLinux hosting environments, limits are put in place to protect against abusers and bad scripts, not to restrict the normal usage of an account.

Lets take a look at how CloudLinux can improve a shared hosting environment.

 

CloudLinux Features

The following is a list of features that make CloudLinux unique.

  1. A Personal Set of Server Resources for Each Customer – With the LVE technology in CloudLinux, each customer’s website account has a separate set of allocated resources. LVE ensures that these resources are not shared with any other website accounts.
  2. Stable Hosting Environments – Sudden traffic spikes from one website account will never mean downtime for any other website account or the server as a whole. Since every website account has its own allocated resources they remain protected. This keeps websites running even if a sudden spike in resource usage comes from other websites hosted on the server.
  3. Secured & Hardened Kernel – CloudLinux’s hardened kernel helps prevent malicious users from attacking other website accounts hosted on the same server.
  4. Multiple Versions of PHP – CloudLinux has a built-in feature called PHP selector. It allows end users to select the specific version of PHP they need. This allows ultimate flexibility by offering all popular versions of PHP, including more than 120 PHP extensions to choose from.

    CloudLinux packages PHP versions 4.4, 5.1, 5.2, 5.3, 5.4, 5.5, and 5.6. The convenient UI lets customers switch between versions, select extensions, and adjust PHP settings as needed.

  5. Stable Mysql Database Performance – MySQL often becomes a major headache for system admins in shared hosting environments. Keeping MySQL stable can be difficult, and customer queries can easily slow everything down.

    The MySQL Governor feature of CloudLinux helps system admins pinpoint abusers and throttle them in real time. It tracks CPU and disk IO usage for every website account in real time and reduces MySQL queries by using same-per-user LVE limits. With support for the latest versions of MySQL and MariaDB, it is a must-have for any shared hosting provider.

 

In Closing

With all its features and advanced technologies, CloudLinux makes maintaining and stabilizing a shared hosting environment easier. This means less time and money spent on resolving frequent resource usage issues and fewer headaches for both hosting providers and their customers.

With CloudLinux, your websites remain stable, your servers stay secure, and your clients stay happy.

 

Popular Links

Looking for more information on CloudLinux? Search our Knowledge Base!

Interested in more articles about Operating Systems? Navigate to our Categories page using the bar on the left or check out these popular articles:

Popular tags within this category include: Linux, Windows, Apache, CentOS, Debian, Fedora, RedHat, and more.

Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.

 

The Hivelocity Difference

Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.

With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.

Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.

The post What is CloudLinux and How Does It Help Shared Hosting? appeared first on Hivelocity Hosting.

]]>