1 / 6

How to Share Linux Terminal Session With Others

Sometimes you may need to share Linux Terminal Session with others. Here are the steps to do so using tmux and screen commands.<br>#linux #ubuntu <br><br>Visit https://fedingo.com/how-to-share-linux-terminal-session-with-others/

Download Presentation

How to Share Linux Terminal Session With Others

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to Share Linux Terminal Session With Others

  2. Screen Sharing Using Single Account - Using Screen Open terminal and run the following screen command to create a session named abc. $ screen -S abc Then open another terminal, on same or different machine, and run the following command to attach to that session. Please note, you need to login using the same account that was used to create the above session. $ screen -x abc

  3. Screen Sharing Using Single Account - Using tmux You can also share session using tmux utility. Open terminal and run the following command to start the session abc using tmux. $ tmux new-session -s abc Open a new terminal on same of different machine, using the same user account and run the following command to attach to the above session. $ tmux attach-session -t abc

  4. Screen Sharing using Different Accounts - Using tmux First of all, we need to set permissions on tmux socket so that both users can read & write to it. The two users need to be a part of the same user group. Open terminal and run the following command to create a new session named shared running on shareds socket. $ tmux -S /tmp/shareds new -s shared Then we use chgrp to add shareds socket to group named joint. Please note, other users who are present in this group will also be able to access the session. $ chgrp joint /tmp/shareds Open another terminal and run the following command to attach to the shared session. $ tmux -S /tmp/shareds attach -t shared

  5. Screen Sharing using Different Accounts - Using Screen You need to set SUID to screen command and remove group write access from /var/run/screen. Then use screen’s ACL to grant permission to second user. Here is the command to set SUID and remove write access from /var/run/screen. $ sudo chmod u+s /usr/bin/screen $ sudo chmod 755 /var/run/screen Next, run the following commands to start a session named abc and add user user2 to the session. $ screen -S abc $ ^A:multiuser on $ ^A:acladd user2 The second user can attach to the first user’s session using the following command. $ screen -x user1/abc

  6. Thank You Visit for details https://fedingo.com/how-to-share-linux-terminal-session-with-others/

More Related