All Products
Search
Document Center

:How can I modify the Unix format of a Linux instance?

Last Updated:Dec 29, 2020

Introduction

On a Linux instance, if key files are not in the Unix format, the instance may be unable to be remotely connected. This article describes how to change the file format from Linux to Unix.

Background

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
  1. Detach the system disk of the abnormal ECS instance and attach the disk as a data disk to a normal ECS instance. For more information, seehow to log on to an abnormal system disk by attaching a data disk to an ECS instance. For more information, see Step 1 to step 4.
  2. Log on to a normal ECS instance, switch to the root user, and edit the specified file.
    vim [$File]
    Note:[$File] indicates the specified File whose format you want to modify.
  3. In the specified file, press Shift+: Key input set ff=unix tuning file format Press Shift again+: Key, then Enter the wq, and finally Press the Enter key to save and exit. A similar output is displayed.

  4. See step 5 "how to log on to an abnormal system disk by using an ECS instance as a data disk to restore the system disk of an abnormal ECS instance."
  5. Remotely log on to the repaired ECS instance and make sure that it is working properly again.

Application scope

  • Elastic Compute Service