Page 1 of 1

Fix lỗi bash: mail: command not found ( trên CentOS, Redhat, Ubuntu and Debian)

PostPosted:10 Jun 2018 09:41
by nguyenoanh
Khi bạn chạy lệnh mail sẽ được trả kết quả:
mail: command not found
Cách khắc phục lỗi này:

1. Trên CentOS/Redhat 7/6/5:

cài mail command:
Code: Select all
yum install mailx
2. Trên Ubuntu/Debian

Cài mail command:
Code: Select all
sudo apt-get install mailutils
3. Test gửi email

Sau khi fix lỗi xong, ta check bằng command:
Code: Select all
echo "Noi dung email" | mail -s "Tieu de email" [email protected]