What's Your Go to Command When You Open a Terminal?

8 points by oraoraoraoraora 3 years ago | 35 comments
for some reason I always enter ls, yet I already know what's in my home folder, its a reflex at this point.
  • oriori 3 years ago
    I use zsh and like keeping my terminal clear, so I found a zsh script called almostontop which clears on pressing enter.

    link: https://github.com/Valiev/almostontop/blob/master/README.md

    • jaredsohn 3 years ago
      For people who want this without downloading a script, pressing cmd-k on a Mac (or equiv on other operating systems) will do this quickly on demand.

      I guess that's my goto.

      • cutthegrass2 3 years ago
        Ahh, useful thanks. I've been using Ctrl-l for years. cmd-k is an easier 'chord' for me on the kinesis so I'll switch.
        • gls2ro 3 years ago
          If you are logging in in multiple *nix systems I suggest you keep the Ctrl+l.

          I started to notice that the more I adopt in terminal specific commands to MacOS the hard is to be productive while I login to various systems.

          I want also to force myself (but did not do it yet) to use a simpler Vim configuration. Maybe just line numbers so that when I login into a new system I should not need any plugin or any other shortcuts. Still I like my .vimrc file but I plan to do this in near future.

      • ozzythecat 3 years ago
        Can you run ‘git status’ or allow it to show history from certain commands?
        • oriori 3 years ago
          Of course it only clears when you run a new command, or press enter. Basically think of it like typing clear after running a command. You can also scroll up and find the last output.
      • johng 3 years ago
        I started using 'w' as a habit on BBS's back in the day... then kept that up when I had an account on super computers in high school...(https://newfutures.aps.edu/supercomputing) it's still muscle memory for me. I have no idea why as most of the machines I'm on now, I'm the only one with an account.

        Old habits die hard. It's just muscle memory at this point.

        • giuliomagnifico 3 years ago
          I have some some shortcuts to open some of my most used "Go to" SSH locations, I'm too lazy to manually write ssh root@192... so cmd+opt+r ssh into my router, cmd+opt+p ssh into RPi etc...
          • jmkr 3 years ago
            `~/.ssh/config` is pretty awesome
            • giuliomagnifico 3 years ago
              Yes, obviously my keys are already stored, I've already said that im lazy? =)
          • brezelgoring 3 years ago
            I always go to the same place, my programming directory, so for years I've done the sequence:

            {cd Pr<tab><enter>cd c<tab><enter>}

            Takes me to my current project folder, and there I can use gcc or vim or whatever I need to do. I thought about shortening it or setting my terminal to start in that directory but the ritual is important to me, it sets me in the right mood, for whatever reason.

            • nicbou 3 years ago
              I created a command that cd to the right project, and optionally start docker, dev tools and other things related to that project.
            • no_time 3 years ago
              .bashrc runs tmux for me automatically but only if I ssh in. It removed just enough friction from using tmux that I finally put in the time to learn it. Would recommend/10

              https://stackoverflow.com/questions/27613209/how-to-automati...

              • jstx1 3 years ago
                Is there a point to using tmux for someone who mostly works on their local machine?
                • mijndert 3 years ago
                  I would say having the exact same keyboard shortcuts for interacting with windows, panes, etc for both your desktop as well as any other machine you work with is worthwile having.
              • rzzzwilson 3 years ago
                cd to get to the directory of interest. After that, probably workon.
                • zzo38computer 3 years ago
                  It depends what I am trying to do; often the first command will be cd (to access whatever directory I will intend to work on), but not always.
                  • f0e4c2f7 3 years ago
                    Sometimes ls.

                    Other times I'll hit enter a few times and then Ctrl+L to clear the screen.

                    Sort of feels like tapping my fingers on the desk.

                    • thorin 3 years ago
                      Probably "pwd", from the days when it wasn't the prompt / my profile / the shell I was using
                      • johncoltrane 3 years ago
                        The command I opened that terminal for.
                        • potta_coffee 3 years ago
                          history | grep <thing>

                          I use a number of tools and I've often forgotten an individual command, or when I'm using tools like curl or docker that have a long single line command that I know I can't remember.

                        • lowcoderev 3 years ago
                          Lol, same here. ls and then clear. Now I'm ready to do whatever I want
                          • warrenm 3 years ago
                            99% of the time, I'm ssh'ing to a remote host

                            So it's `ssh <host>`

                            • isubasinghe 3 years ago
                              no matter what I do `ls` as well
                              • p0d 3 years ago
                                cat .ssh/config

                                ssh nameIforgot:/to/fix

                                • Ftuuky 3 years ago
                                  ls -l as a force of habit I guess
                                  • tytrdev 3 years ago
                                    You probably know this but:

                                    ll and la are shorthand for ls -l and ls -la

                                  • tytrdev 3 years ago
                                    ls
                                    • mijndert 3 years ago
                                      tmux
                                      • oriori 3 years ago
                                        I'm sure you can automate this.
                                        • mijndert 3 years ago
                                          Not everything has to be "automated" and "optimized" all the time.
                                      • flamesofphx 3 years ago
                                        clear