I understand that the above is a text file and I want to open in for editing. I am using:

sudo /etc/syslog-ng/syslog-ng.conf

How must I modify this command?

  • sudo <text editor you want to use> /etc/syslog-ng/syslog-ng.conf (you can use gedit for example). sudo /etc/syslog-ng/syslog-ng.conf will try to execute that text file as a superuser. – Salem Jul 22 '13 at 8:00
  • I have done that , i installed gedit and modified my command but now it says sudo:gedit:command not found – sosytee Jul 22 '13 at 8:06
  • @sosytee gedit is installed by default. Maybe you uninstalled it. – Radu Rădeanu Jul 22 '13 at 8:13
  • @RaduRădeanu i have to direct this question to you, i hope you can help, what do i do if i nolonger have that configuration file for syslog-ng. Due to low familiarity with vi editor, i made one too many mistakes and i then removed the file. I was assuming uninstalling and reinstalling syslog-ng would be the solution, but it seems that file is gone – sosytee Jul 23 '13 at 5:33
  • @sosytee This may help you: slideshare.net/balabit/syslogng-configuration-file – Radu Rădeanu Jul 23 '13 at 5:47

As Salem said in this comment, you should use:

sudo -i
gedit /etc/syslog-ng/syslog-ng.conf

to open in a GUI editor.


sudo vi /etc/syslog-ng/syslog-ng.conf

to edit right in terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.