I installed rar, but I want to know where it is stored?
sudo apt-get rar
it installed it, but typing : sudo unrar file.rar doesn't work, says it doesn't know what the command is.
unrar is a different program from rar. You'll have to install that too. Mostly all your programs will be stored in /usr/bin or /usr/sbin . You can add this function to your .bashrc file and then just use the command extract to extract any archive :