To edit the file you need to mount the boot msdos part. of the boot media, like this if you use sdcard.
mount /mnt/mmcblk0p1/
vi /mnt/mmcblk0p1/config.txt
If you have nano installed it's little easier editor to handle the file.
nano /mnt/mmcblk0p1/config.txt