- Newest
- Most votes
- Most comments
Hello.
Is it possible to check the path settings using the following command?
echo $PATH
Also, is it possible to execute the command with the full path as follows?
The lsblk command is probably installed on most Linux operating systems, so if you can't find the command, it's possible that you accidentally deleted a directory.
/usr/bin/lsblk
It appears you're experiencing an issue with basic Linux commands not being available in your Lightsail instance. This suggests you might be using a minimal or custom image that doesn't include standard Linux utilities.
The error messages indicate that both lsblk and even sudo commands are not found, which is unusual for standard Linux distributions. Here are some steps to troubleshoot:
- First, check what shell you're using and what Linux distribution is running:
echo $SHELL
cat /etc/os-release
- Since you can't use
lsblkorsudo, try these alternative commands to see your disks:
ls -la /dev/
cat /proc/partitions
- To see if your disk is attached at the system level, you can try:
df -h
- If you need to install the missing utilities, you'll need to use the package manager available on your system. Since
sudoisn't available, you might need to use:
yum install util-linux
Or if you're on a Debian-based system:
apt-get install util-linux
If these commands also fail, you might need to:
- Create a snapshot of your instance
- Launch a new instance with a standard Amazon Linux or Ubuntu image
- Attach your disk to the new instance
Remember that when attaching a disk to a Lightsail instance, both the disk and instance must be in the same AWS Region and Availability Zone. Based on your description, you've already confirmed this is not the issue.
Sources
Resolve Lightsail disk attachment and usage issues - Amazon Lightsail
Create and attach Lightsail block storage disks to Linux instances - Amazon Lightsail
Troubleshoot issues connecting to your Amazon EC2 Linux instance - Amazon Elastic Compute Cloud

Thanks for your response. This is the output, [ec2-user@***]$ echo $PATH /usr/local/cpanel/3rdparty/lib/path-bin:/usr/share/Modules/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
I tried your alternate suggestion and got this: [ec2-user@***]$ /usr/bin/lsblk -bash: /usr/bin/lsblk: No such file or directory Which of the path folders would you expect to contain tools like lsblk?
Apologies as I'm not an experienced Nix admin ;)