LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2019, 02:10 PM   #1
shlomo.hovir
Member
 
Registered: Oct 2018
Posts: 66

Rep: Reputation: Disabled
problems for using dash


i want to use dash as a default shell but my main problem i want to get previous commands when clicking up arrow i can't how to do it
bash does that but i noticed all other shells don't support that
 
Old 01-02-2019, 03:51 PM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by shlomo.hovir View Post
bash does that but i noticed all other shells don't support that
I'm not sure about ksh (it does support history but I'm no export in how) but tcsh most certainly does.

And dash is not really meant to be an interactive shell, because supporting features like that would make it into another bash. The main advantage of dash is that it's much smaller, ensuring a much lower STARTUP time in scripts, but this does mean that it has omitted many features that enhance interactive use. After the startup time, mostly due to its size and initialization, bash is just as fast as dash.

Normally you make your login shell bash (or tcsh) but create a symbolic link from /bin/dash to /bin/sh, so that by default scripts will use dash instead.
You can still explicit run scripts with bash then by using as first line of that script
Code:
#!/bin/bash
A login (or terminal window) shell is only started once, a shell script has to start a new shell for each script executed or recursively called. And they are not using interactive features (like history) anyway, so the lack of them isn't important.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm using Ubuntu 16.04LTS. Lately my Ubuntu Software will not launch from the launcher or from dash board . dwsordiff Linux - Newbie 3 03-18-2018 06:38 PM
[SOLVED] Ubuntu 16.04 How to view installed programs / apps not using dash ? lax luthier Linux - Newbie 1 05-03-2017 06:18 AM
LXer: 5 problems with Ubuntu 12.04 part 1: Unity Dash usability issues LXer Syndicated Linux News 0 04-03-2012 11:13 PM
[SOLVED] how do I escape dash when using grep hui Programming 13 11-18-2011 02:57 PM
howto change $PS1 when using su (without dash) remcovr Red Hat 2 09-07-2006 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration