How do you search in commands that you executed in past in Linux terminal?
Experience Level: Junior
Tags: Linux
Answer
Use reverse search feature.
Press Ctrl+R, type the search term, the matching command will be displayed. To display other matching commands continue pressing Ctrl+R.
To exit reverse search press Ctrl+C.
Related Linux job interview questions
How do you move to the end of the line in Linux terminal?
Linux JuniorHow do you move to the beginning of the line in Linux terminal?
Linux JuniorHow do you run multiple commands in Linux terminal but only run the next command if the previous command succeeded?
Linux JuniorHow do you run multiple commands at once in Linux terminal?
Linux JuniorHow do you go back to home directory in Linux?
Linux Junior