Home > bash, linux > open a terminal in a specified folder

open a terminal in a specified folder

Problem
From a script I want to launch a terminal that opens in a specified folder.

Solution
Thanks to #linux, I got two solutions:

A1) I use konsole, which has an option for this:

konsole --workdir /tmp

It will open a terminal in the /tmp directory.

A2) Change directory to the specified folder and launch the terminal:

cd /tmp; konsole

If you want to do it from a script, the idea remains the same.

B) If you want to execute a command automatically in the opening terminal, use this:

konsole -e mc

C) Set the title of Konsole to a specified text:

konsole -p tabtitle='NVIM server'

Find more info here.

Categories: bash, linux Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: