Learn all about base64 command
base64 is used to encode/decode data,FILE and print to standard output.
root:~# man base64
To encode text or file to base64, use the following:
root:~# echo 'this is linux tutorial' | base64 dGhpcyBpcyBsaW51eCB0dXRvcmlhbAo=
root:~# echo 'this is linux tutorial' | base64 -w 10 dGhpcyBpcy BsaW51eCB0 dXRvcmlhbA o=
root:~# cat file.txt abc def ghi root:~# base64 file.txt YWJjCmRlZgpnaGkK
echo 'dGhpcyBpcyBsaW51eCB0dXRvcmlhbAo=' | base64 -d this is linux tutorial
echo 'YWJjCmRlZgpnaGkK' | base64 -d abc def ghi