UNIX arrow up history

Posted on 2011-05-06
Last Modified: 2012-05-11

I am fairly new to UNIX.  How do I change the command line so that I can use the up arrow to go through the command history?

Question by:IRHusker
    LVL 9

    Expert Comment

    That would be a function of the shell you are using.

    What operating system?

    You can start by trying to run bash

    $ bash

    Open in new window

    and if you can get bash to run, you can probably starting using the arrows for command line history.
    LVL 4

    Expert Comment

    I normally use Escape+K to go up and Escape+J to go down...

    I believe this depends on having an environment variable EDITOR=vi

    Author Comment

    Thank you!  

    $ Bash

    Author Comment

    FYI - I am using Solaris UNIX.
    LVL 9

    Accepted Solution

    Ok, then you have bash available.

    So, you can change your shell to use /bin/bash (check and make sure that the path is correct)

    usermod -s /bin/bash <username>

    And then you'll be running bash every time you log in.

    In the mean time, when you start bash, you can start using its history.

    Control the number of items stored in its history using the HISTORY environment variable.

    Expert Comment

    i run tch

    then just use the up/down keys

    Author Closing Comment

    Thanks Bro!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now