Hi people,
I'm quite new to Linux and fortunately enjoying working with it a lot.
The good thing is that i also enjoy working with the terminal.
I've done quite some tasks with the terminal. But some of them i just keep forgetting and i have to google everytime to find a command. For example starting and stopping a server and switching off my mousepad when i'm coding.
My question is:
Is there a nice terminal kind of way to remember my commands with and store them alphabetically or chronologically?
With other words automatically making a personal file where i can find al my used commands in without googling al the time.
This will speed up my command learning proces
Thanks a lot.
Storing linux commands
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Storing linux commands
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Storing linux commands
Maybe not exactly what you want but the terminal stores used commands. Cycle through them with arrow up, arrow down.
Re: Storing linux commands
Hi PeterTi,
Good to hear you like the command line! The commands you use in the terminal are automatically saved in the history, I believe it keeps the last 2000 commands you ran in the terminal.
There are several ways to use the history:
Also see:
Good to hear you like the command line! The commands you use in the terminal are automatically saved in the history, I believe it keeps the last 2000 commands you ran in the terminal.
There are several ways to use the history:
- 1. Use the 'up key' to go one command back in the command line history.
- 2. Use the command
to show the entire command line history. This is often combined with a search, for example:
Code: Select all
history
will show you all commands from the history in which the string 'config' occurs.Code: Select all
history | grep 'config'
- 3. Use the 'bang'-syntax (that's what commands starting with an exclamation mark are called). For example:
will run the last command again. But probably more useful is:
Code: Select all
!!
which will run the most recent command which started with 'foo'.Code: Select all
!foo
Also see:
Code: Select all
man history
Last edited by semicolon on Thu Apr 18, 2013 9:24 am, edited 1 time in total.
Re: Storing linux commands
This may be of interest..
http://www.webupd8.org/2010/09/cli-comp ... o-use.html
http://www.webupd8.org/2010/09/cli-comp ... o-use.html
CLI Companion is a tool aimed at making the terminal easier to use: it's a GUI that displays a list of commands and an embedded terminal under it. The application comes with a list of commonly used commands by default, each having a short description and if you want to find out more about a certain command, simply right click it and select "Help". This will display the "man" (manual) for the selected command.
You can of course add your own commands to CLI Companion: simply click the "Add" button, then enter your command, an argument (optional) and a description.
To run a command, you just have to select it and click "Apply" and you'll see the output in the embedded terminal. If the command requires an argument, it will prompt you - all using a GUI. You can also run multiple commands in the same time: click the "+" sign on the right and a new tab will open.
Advanced users may also find Cli Companion useful by storing custom commands they came across for easier access and since CliCompanion has a built-in search tool, those commands will be easy to find and run.
Last edited by GeneC on Thu Apr 18, 2013 9:27 am, edited 1 time in total.
Re: Storing linux commands
Just found it:
And i will try cli companion. Thanks!
Code: Select all
gedit ~/.bash_history
Re: Storing linux commands
Thank-you GeneC. I have been wanting to compile a list of commands for some time. This looks like it will keep a database of all my commands with my notes plus a terminal to run them in. Seems easier than searching the net or opening a seperate text file I created.