How Do I Type M in Linux?
Contents

To enter the ^M character on Linux terminal, press CTRL-V + M at the same time. For an in-depth explanation of line endings, see Newline from Wikipedia.

What is M in Linux file?

It is known as carriage return. If you’re using vim you can enter insert mode and type CTRL – v CTRL – m . That ^M is the keyboard equivalent to r. Inserting 0x0D in a hex editor will do the task.

How do I find Ctrl-M characters in Linux?

grep command allows you to search a string in a file. So run grep ^M <file name> to find out and display all the line where this character is present. To type “^M” – click Ctrl+V and Ctrl+M i.e you can hold the CTRL key and press V and M sequentially.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest