user1952686 user1952686 - 10 months ago 61
Linux Question

how to turn on word wrap in linux less viewer?

Word wrap mode of "less" viewer is disabled by default in the system i work on. According to "less" viewer help, is it is disabled with -S or --chop-long-lines flags. I did not find how to force word wrap on my system. Is there any known flag, or any other way, for enabling the mode?


You may try using the LESS environment variable. For example, you can put the following into system-wide shell initialization script (/etc/profile for bash/ksh):

 export LESS="-S "