달력

4

« 2024/4 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
.. .. ..

Q. How do I turn on or off file name colors in bash shell?

A. Most modern Linux distro comes with alias that defines colors for your file. However ls command is responsible for displaying color on screen for files, directories and other object.

By default, color is not used to distinguish types of files. You need to pass --color option to ls command.

Task: Turn off colors

Type the following command
$ ls --color=none
Or just remove alias with unalias command:
$ unalias ls

Task: Turn on colors

Use any of the following command:
$ ls --color=auto
$ ls --color=tty


.
:
Posted by .07274.