The sudo command runs 'echo' as root but the '>' redirection happens in your shell as your normal user.

Try this instead:
echo "deb http://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6/ xenial main" | sudo tee /etc/apt/sources.list.d/freeswitch.list

tee will send the line to both stdout and the file, and since it's run as root will overwrite the file with permission to do so.

On 13 January 2018 at 15:34, Ali Haider <alihaider.4189@gmail.com> wrote:
hiii
how to solve
   sudo echo "deb http://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6/ xenial main" > /etc/apt/sources.list.d/freeswitch.list
bash: /etc/apt/sources.list.d/freeswitch.list: Permission denied


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org