10 Useful to Somewhat Useful Bash Shortcuts: Every second saved is a second earned.com

You’re closer than you think to a career in tech. Our grads have launched rewarding new careers — you can too.

View Our Jobs Report

The following is a guest post by Brendan Manley and originally appeared on his blog. Brendan is currently in the Ruby-003 class at The Flatiron School. You can follow him on Twitter here.

1. move cursor one word to the left:

esc + b

Isn’t it annoying that you often find yourself holding down your left arrow key until it’s begging you to stop?

2. jump to the end of the line (figuratively…I mean with your cursor)

ctrl + e

3. jump to the beginning of the line

ctrl + a

4. delete the word immediately to the left

ctrl + w

5. delete entire line

ctrl + u

This one is now a personal favorite….

6. the equivalent of the browser back button, but in your terminal

cd -

Now, I know that everyone already knows about ‘cd ..’. However, tip number 6 is useful if you’re jumping around your directories with portkeys (Harry Potter reference).

7. create parent directory and children simultaneously 

mkdir -p mamabear/smokey/pokey/loki

8. chain commands using &&

rub && cd cool && ruby chronozoa.rb

why not?

9. use Chris Hemsworth’s striking good lucks to generate a list of when each file in the current directory was edited last (+ who did the deed)

ls - thor

10. generate random password

egrep -ioam1 ‘[a-z0-9]{8}’ /dev/urandom

Yes, you may never use this one. But now at least you know what you’re missing out on! ‘[a-z0-9]’ represents the characters that are allowed in the password you’ll be generating and {8} represents the character length.

; )

Headshot of Flatiron School

Flatiron School

Blog Post Author

Read More Flatiron School Articles

Since we opened our doors in 2012, thousands of students have joined Flatiron School to launch new careers in tech.

Explore our Courses

Find the perfect course for you across our in-person and online programs designed to power your career change.

Explore Our Courses
Join a Community

Connect with students and staff at meetups, lectures, and demos – on campus and online.

Join the Community
Schedule a Chat

Have a question about our programs? Our admissions team is here to help.

Schedule a Chat