I am using a Linux server andtrying to install the jdk package. But when i try sudo apt , I get the following error:
sudo: apt-get: command not found
It seems that you have CentOS on your server based on Linux version. You can try Yum instead. For example:
sudo yum install ...