How to download FASTA sequences from NCBI using the terminal? I have following accession numbers of the 10 chromosomes of Theobroma cacao genome.

NC_030850.1
NC_030851.1
NC_030852.1
NC_030853.1
NC_030854.1
NC_030855.1
NC_030856.1
NC_030857.1
NC_030858.1
NC_030859.1


I need to download these FASTA files using the terminal because I'm working on a server. I'll be grateful if someone can help me.
Thank you.
Alternatively, you can use the NCBI Entrez Direct UNIX E-utilities

Basically, you have to download the install file here: https://www.ncbi.nlm.nih.gov/books/NBK179288/bin/install-edirect.sh

In the terminal, install it using: source ./install-edirect.sh

Then, you can download your sequence by doing:

esearch -db nucleotide -query "NC_030850.1" | efetch -format fasta &gt; NC_030850.1.fasta

And you should find your fasta sequence downloaded. 

As you have several sequences to download, I think it will be quite easy to add this command into a little bash script to process all of them.

More readings about that: http://bioinformatics.cvr.ac.uk/blog/ncbi-entrez-direct-unix-e-utilities/ and https://www.ncbi.nlm.nih.gov/books/NBK179288/