Hi to all.
To print a text file in Ubuntu to a printer. We can use simply cat command for that. We don’t need printer driver files. The command used to print the file is
sudo cat sample.txt > /dev/usb/lp0
Here we want to run the above mentioned command as root user. Also the printer must be connected in USB port.
Then we can use this command. Other wise we want to see any other lpt ports is connected.