0

is there anyway to save newly created commands in the terminal? Every time, I exit the terminal, all of the commands I created are lost.

Thank you.

2
  • 2
    you could get them by running history command. Sep 24, 2014 at 16:53
  • 1
    add them to .bashrc as functions.
    – Rinzwind
    Sep 24, 2014 at 17:07

1 Answer 1

1
  1. Use the key
  2. Use the reverse search integrated in the terminal by pressing ctrl and r
  3. Use a bin file
    • open gedit by typing gedit in the dash
    • enter #/bin/bash in the first row
    • now enter each command in a new line
    • save it in /home/[username]/bin/ without an ending (gedit does it automatically right)
    • go into nautilus (the data explorer) and right click the file
    • go on properties and check the box "allow executing file" under properties
    • now just click doubled
    • a window saying run in terminal,display,cancel,run
    • just click run in terminal or run
    • now you're script must run...

an example for the file:

#/bin/bash
gnome-system-settings

The first one is easier to use with one command, but the second one is better for running multiple ones after each other.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .