{"id":2045,"date":"2023-02-25T23:51:16","date_gmt":"2023-02-25T23:51:16","guid":{"rendered":"https:\/\/linuxdigest.com\/?p=2045"},"modified":"2023-02-25T23:53:52","modified_gmt":"2023-02-25T23:53:52","slug":"how-to-change-the-title-in-gnu-screen","status":"publish","type":"post","link":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/","title":{"rendered":"How to Change the Title in GNU Screen"},"content":{"rendered":"\n

If you are an experienced Linux user, chances are you have used GNU screen at some point. GNU screen is a powerful terminal multiplexer that enables you to create multiple virtual terminals within a single window. An added benefit is that you can exit your terminal session and come back to it as you left it.<\/p>\n\n\n\n

I find that once I have more than one window or region<\/a> in my screen session, it becomes important to organize my terminal. That’s where window titles come in handy. You can name each window according to the task that is being performed.<\/p>\n\n\n\n

In this article, I will show you how you can, name the window and browse windows by their titles. And at the end, I will show you how you can also name your sessions in case you are running more than one session.<\/p>\n\n\n\n

How do you change the title in GNU screen?<\/h2>\n\n\n\n

To change the name of a window or a region in GNU screen, all you need to do is hit Ctrl-a A<\/strong>. Once you do that, a prompt will appear at the bottom of the screen. There you can write the new name and hit enter to apply it.<\/p>\n\n\n\n

In case you are unfamiliar with screen key bindings: Ctrl-a A<\/strong> means that you will press the Ctrl key and a simultaneously. Release them and then hit SHIFT and a for an upper case A. This key sequence is often written as C-a A<\/strong> in GNU screen documentation.<\/p>\n\n\n\n

The window should now have a new title. If it is not visible in your configuration, you can hit Ctrl-a N<\/strong> to display the current title.<\/p>\n\n\n\n

Browse windows by name.<\/h2>\n\n\n\n

You can list all the current windows with Ctrl-a \u201c<\/strong>. This will bring up a list of the currently open windows and you can select a window using your arrow keys.<\/p>\n\n\n\n

Set the window title at startup<\/h2>\n\n\n\n

You can set the window’s title before entering the screen by passing it the -t<\/strong> option. If the name contains spaces, you will have to wrap it in quotes.<\/p>\n\n\n\n

screen -t \"My new window\"<\/pre>\n\n\n\n

How do you change the name of a screen session?<\/h2>\n\n\n\n

When you have multiple sessions of screen running, each of them will have a name similar to this:<\/p>\n\n\n\n

linuxdigest@linuxdigest:~$ screen -ls\nThere are screens on:\n\t1695.pts-3.linuxdigest\t(03\/05\/23 00:54:10)\t(Attached)\n\t1554.console.linuxdigest\t(03\/05\/23 00:50:59)\t(Attached)\n2 Sockets in \/run\/screen\/S-linuxdigest.<\/pre>\n\n\n\n

These names are constructed of the process ID, TTY, and hostname. If you have more than one session, remembering which session is which will start to get confusing.<\/p>\n\n\n\n

You can change the name of the session you are in by evoking the command mode with Ctrl-a :<\/strong> and issuing the command sessionname, like so:<\/p>\n\n\n\n

:sessionname myName<\/pre>\n\n\n\n

Once you have done this, the session names will hopefully be easier to distinguish:<\/p>\n\n\n\n

linuxdigest@linuxdigest:~$ screen -ls\nThere are screens on:\n\t1695.myName\t(03\/05\/23 00:54:10)\t(Detached)\n\t1554.logViewer\t(03\/05\/23 00:50:59)\t(Detached)\n2 Sockets in \/run\/screen\/S-linuxdigest.<\/pre>\n\n\n\n

Set the session name when starting screen<\/h2>\n\n\n\n

Of course, you can also set the session name when you start a new screen session. This is done with the -S<\/strong> option. If you want to name the session ScreenTutorial, you will have to write the following on the command line:<\/p>\n\n\n\n

screen -S ScreenTutorial<\/pre>\n\n\n\n

Now when you list the running sessions with screen -ls<\/strong> or screen -list<\/strong>, you will see something like this:<\/p>\n\n\n\n

linuxdigest@linuxdigest:~$ screen -list\nThere is a screen on:\n        1816.ScreenTutorial     (03\/05\/23 06:12:53)     (Attached)\n1 Socket in \/run\/screen\/S-linuxdigest.<\/pre>\n\n\n\n

Thats it! Now you should be able to name your windows and sessions like a pro! I hope you found this useful.<\/p>\n","protected":false},"excerpt":{"rendered":"

If you are an experienced Linux user, chances are you have used GNU screen at some…<\/p>\n","protected":false},"author":1,"featured_media":2055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27],"tags":[42],"yoast_head":"\nHow to Change the Title in GNU Screen - Linux Digest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change the Title in GNU Screen - Linux Digest\" \/>\n<meta property=\"og:description\" content=\"If you are an experienced Linux user, chances are you have used GNU screen at some…\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Digest\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-25T23:51:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-25T23:53:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxdigest.com\/wp-content\/uploads\/2023\/02\/screenchange-the-title.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"740\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"The Linux Digest Guy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"The Linux Digest Guy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\"},\"author\":{\"name\":\"The Linux Digest Guy\",\"@id\":\"https:\/\/linuxdigest.com\/#\/schema\/person\/29c97230aa94affab929a88c6a10adb2\"},\"headline\":\"How to Change the Title in GNU Screen\",\"datePublished\":\"2023-02-25T23:51:16+00:00\",\"dateModified\":\"2023-02-25T23:53:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\"},\"wordCount\":536,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/linuxdigest.com\/#organization\"},\"keywords\":[\"screen\"],\"articleSection\":[\"Command line tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\",\"url\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\",\"name\":\"How to Change the Title in GNU Screen - Linux Digest\",\"isPartOf\":{\"@id\":\"https:\/\/linuxdigest.com\/#website\"},\"datePublished\":\"2023-02-25T23:51:16+00:00\",\"dateModified\":\"2023-02-25T23:53:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/linuxdigest.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change the Title in GNU Screen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxdigest.com\/#website\",\"url\":\"https:\/\/linuxdigest.com\/\",\"name\":\"Linux Digest\",\"description\":\"Linux tutorials for everyone\",\"publisher\":{\"@id\":\"https:\/\/linuxdigest.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxdigest.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/linuxdigest.com\/#organization\",\"name\":\"Linux Digest\",\"url\":\"https:\/\/linuxdigest.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxdigest.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/linuxdigest.com\/wp-content\/uploads\/2019\/11\/logo1.png\",\"contentUrl\":\"https:\/\/linuxdigest.com\/wp-content\/uploads\/2019\/11\/logo1.png\",\"width\":1102,\"height\":170,\"caption\":\"Linux Digest\"},\"image\":{\"@id\":\"https:\/\/linuxdigest.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxdigest.com\/#\/schema\/person\/29c97230aa94affab929a88c6a10adb2\",\"name\":\"The Linux Digest Guy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxdigest.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ac6bcf745dec6961360ccf2d2711f26c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ac6bcf745dec6961360ccf2d2711f26c?s=96&d=mm&r=g\",\"caption\":\"The Linux Digest Guy\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change the Title in GNU Screen - Linux Digest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/","og_locale":"en_US","og_type":"article","og_title":"How to Change the Title in GNU Screen - Linux Digest","og_description":"If you are an experienced Linux user, chances are you have used GNU screen at some…","og_url":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/","og_site_name":"Linux Digest","article_published_time":"2023-02-25T23:51:16+00:00","article_modified_time":"2023-02-25T23:53:52+00:00","og_image":[{"width":1280,"height":740,"url":"https:\/\/linuxdigest.com\/wp-content\/uploads\/2023\/02\/screenchange-the-title.jpg","type":"image\/jpeg"}],"author":"The Linux Digest Guy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"The Linux Digest Guy","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#article","isPartOf":{"@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/"},"author":{"name":"The Linux Digest Guy","@id":"https:\/\/linuxdigest.com\/#\/schema\/person\/29c97230aa94affab929a88c6a10adb2"},"headline":"How to Change the Title in GNU Screen","datePublished":"2023-02-25T23:51:16+00:00","dateModified":"2023-02-25T23:53:52+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/"},"wordCount":536,"commentCount":0,"publisher":{"@id":"https:\/\/linuxdigest.com\/#organization"},"keywords":["screen"],"articleSection":["Command line tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/","url":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/","name":"How to Change the Title in GNU Screen - Linux Digest","isPartOf":{"@id":"https:\/\/linuxdigest.com\/#website"},"datePublished":"2023-02-25T23:51:16+00:00","dateModified":"2023-02-25T23:53:52+00:00","breadcrumb":{"@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/linuxdigest.com\/howto\/how-to-change-the-title-in-gnu-screen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxdigest.com\/"},{"@type":"ListItem","position":2,"name":"How to Change the Title in GNU Screen"}]},{"@type":"WebSite","@id":"https:\/\/linuxdigest.com\/#website","url":"https:\/\/linuxdigest.com\/","name":"Linux Digest","description":"Linux tutorials for everyone","publisher":{"@id":"https:\/\/linuxdigest.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxdigest.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxdigest.com\/#organization","name":"Linux Digest","url":"https:\/\/linuxdigest.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxdigest.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxdigest.com\/wp-content\/uploads\/2019\/11\/logo1.png","contentUrl":"https:\/\/linuxdigest.com\/wp-content\/uploads\/2019\/11\/logo1.png","width":1102,"height":170,"caption":"Linux Digest"},"image":{"@id":"https:\/\/linuxdigest.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxdigest.com\/#\/schema\/person\/29c97230aa94affab929a88c6a10adb2","name":"The Linux Digest Guy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxdigest.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ac6bcf745dec6961360ccf2d2711f26c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ac6bcf745dec6961360ccf2d2711f26c?s=96&d=mm&r=g","caption":"The Linux Digest Guy"}}]}},"_links":{"self":[{"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/posts\/2045"}],"collection":[{"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/comments?post=2045"}],"version-history":[{"count":5,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/posts\/2045\/revisions"}],"predecessor-version":[{"id":2174,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/posts\/2045\/revisions\/2174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/media\/2055"}],"wp:attachment":[{"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/media?parent=2045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/categories?post=2045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxdigest.com\/wp-json\/wp\/v2\/tags?post=2045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}