Manjaro Yapılandırma dosyalarını görüntüleme ve düzenleme

Yapılandırma dosyalarını görüntüleme ve düzenleme

From Manjaro
Revision as of 21:19, 15 April 2024 by Orcun (talk | contribs) (Created page with "Birincisi, metin düzenleyiciyi çalıştırmak için sudo kullanmaktır. Örneğin, fstab dosyanızı düzenlemek için şunu yazabilirsiniz: {{UserCmd|command=sudo nano /...")
Other languages:
English • ‎Türkçe • ‎русский

Genel Bakış

Manjaro'da, sistem ve uygulamaların konfigürasyonunun düz metin konfigürasyon dosyalarının içinde bulunması yaygındır. Bu dosyalar hem terminalden/tty'den hem de masaüstü ortamından görüntülenebilir ve düzenlenebilir.

Terminal

Yapılandırma dosyalarını terminal/tty'den görüntüleme

Dosyaları komut satırından görüntülemenin iki temel yolu vardır.

cat <dosya adı> yazarak bir dosyanın içeriğini ekrana dökmek için cat komutunu kullanabilirsiniz. Örneğin fstab'ınızın içeriğini görüntülemek için şunları kullanabilirsiniz:

user $ cat /etc/fstab COPY TO CLIPBOARD


Gezinmenin daha iyi olacağı daha büyük dosyalar için daha azını kullanabilirsiniz. Örneğin, pacman.conf dosyanızın içeriğini görüntülemek için şunu yazabilirsiniz:

user $ less /etc/pacman.conf COPY TO CLIPBOARD


Dosyaları terminalden düzenleme

Dosyaları komut satırından düzenlemek için pek çok düzenleyici mevcuttur ancak Manjaro'nun her sürümünde bulunan düzenleyici nano'dur.

Nano ile bir yapılandırma dosyasını açmak için nano <dosya adı> yazmanız yeterlidir. Örneğin, .profile dosyanızı düzenlemek için şunu yazabilirsiniz:

user $ nano ~/.profile COPY TO CLIPBOARD


Nano için tuş bağlantıları ekranın alt kısmında görülebilir. ^ ctrl tuşunu belirtir. Örneğin nano'dan çıkmak için ctrl tuşunu basılı tutup 'x' tuşuna basabilirsiniz.

Bazen /etc dizinindeki çoğu dosya gibi bir dosyayı düzenlemek için yükseltilmiş ayrıcalıklar gerekebilir. Bu durumlarda, bu dosyaları düzenleme haklarını edinmenin iki yolu vardır.

Birincisi, metin düzenleyiciyi çalıştırmak için sudo kullanmaktır. Örneğin, fstab dosyanızı düzenlemek için şunu yazabilirsiniz:

user $ sudo nano /etc/fstab COPY TO CLIPBOARD


An alternative, and arguably safer method, would be to save a copy of the file somewhere you can write and then use sudo to move it. For example, if you used nano to edit your fstab and then saved a copy to your home folder, you could then move it to the proper location with sudo:

user $ sudo mv ~/fstab /etc/fstab COPY TO CLIPBOARD


Desktop Environment

Each Desktop Environment includes a different graphical text editor. These can be started from the menu/launcher or from the command line.

To edit or view a file you can open it directly from the command line. Reference the list below to find the appropriate editor installed with your edition. For example to open your pacman.conf from the XFCE edition you could type:

user $ mousepad /etc/pacman.conf COPY TO CLIPBOARD


Alternatively, you could launch mousepad from the whisker menu and open the file by browsing to it. Sometimes, the menu item will have the name as found below but it can also simply read 'Text Editor'

List of graphical text editors for each edition

  • XFCE: mousepad
  • Gnome: gedit
  • KDE/plasma: kate
  • Awesome: mousepad
  • bspwn: gedit
  • Budgie: gedit
  • Cinnamon: xed
  • Deepin: gedit
  • i3: mousepad
  • LXDE: leafpad
  • LXQT: juffed-qt5
  • MATE: pluma
  • Openbox: xed

Editing files requiring privilege escalation

Warning
Never use sudo to run a graphical text editor. This can have unintended consequences or break the permission to configuration files that should not be owned by root.

Many of the graphical text editors will automatically ask for privilege escalation when they detect that you cannot write to a file.

If they don't, you can save a copy of the file to your home folder and move it into place using sudo. For example, if you edit your fstab and then saved a copy to your home folder, you could then move it to the proper location with sudo:

user $ sudo mv ~/fstab /etc/fstab COPY TO CLIPBOARD


Cookies help us deliver our services. By using our services, you agree to our use of cookies.