What's the first command you type every day? šŸ–„ļø

We all have commands we type almost automatically every day.

So I’m curious:

What’s the first command you type when you start using your PC each day?

Mine changes depending on what I’m working on, but I definitely have a few commands I run out of habit. :joy:

What’s yours?

1 Like

I almost never use commands. I used to use apt-get update and upgrade but now I just use the GUI software updater.

The one command I find essential is ā€˜sudo dpkg --configure -a’ if you have a problem downloading and installing software like a power failure while upgrading or dependency problems. I keep a cheat sheet for that and anything else I might need.

4 Likes

That’s actually a good one. :joy:

I also use GUI tools for a lot of things, especially when there’s no reason to open a terminal.

And ā€œsudo dpkg --configure -aā€ is definitely one of those commands worth remembering when an interrupted update leaves things in a weird state.

A cheat sheet is honestly a great idea too. There are always a few commands you forget until the exact moment you need them.

2 Likes
sudo apt update
3 Likes

Like me :+1:
But sometimes I use ffmpeg or top

1 Like

Biggest reasons I like a cheat sheet is I am a poor typist, bad at spelling and have a poor memory.

3 Likes

That daily command was ssh at work. At home I can issue no terminal command for weeks.

3 Likes

The first command I execute is a UpArrowEnter which usually just runs the following

 snap refresh;apt update; apt autoremove ; apt autoclean ; apt full-upgrade ; fastfetch 

so I’m just updating packages.

Though you may not notice it, there are spaces in front of the command, as with my current profile that means the command doesn’t get stored in my .bash_history and so it’s less cluttered.

There also isn’t any -y, so I can actually read the output (esp. given I’m using apt full-upgrade) & accept it only if I’m happy.

The apt autoremove I think is helpful, as if I’ve laid a ā€˜mine’ for myself (through stupid prior apt remove), I’d rather notice it ā€˜sooner’ than ā€˜later’, as there is more chance I’ll remember what I did that caused it..

The apt autoclean is out of habit as I’ve had disk space issues somewhat often. I peruse the output (apt autoremove; apt autoclean) before I accept the full-upgrade command too.

The fastfetch just gives me a reminder of how long the machine has been up (I reboot it every ~14 days; switching to dual boot install first & updating it), and it gives my $HOSTNAME & some machine detail (to ensure I’m on the correct box at a minimum; that I’m not ssh'd into another box OR my keyboard/mouse/screens aren’t controlling another box (KVM switches here).

3 Likes

What about >uptime<
They are same thing

1 Like

I’m not sure about the first, but here are my most used on this new system:

cd        29
apt       25
vi        13
dpkg       8
btop       7

So I think apt is probably the winner for this question.

3 Likes

for me first command it’s cd
zoxide nnn coreutils() ffmpeg sha*sum 7z age gpg git
then other infinite amount of clis

3 Likes

I also don’t really have one fixed command I use at the start of my day. Sometimes it’s going into a directory, sometimes it’s activating a conda environment…

However, usually, at the end of the day, before I shut down my computer I run update-system, which is an alias for sudo apt update && sudo apt upgrade && sudo apt autoremove && flatpak update.

4 Likes

No one does it the old fashioned way with startx?

(I had to look that up. I think I got it right? I knew it at one time but forgot it)

5 Likes

This is an intriguing question. And like some it depends on what work or problem I am trying to solve. So with that said the most popular for me to start with are ping, drill, and ssh.

3 Likes

Yes uptime does..

.. but I ssh into other boxes, and I’ve made mistakes before in not noticing $PS1; thus I also scan Host [field], OS & even the Display lines (eg. current box lists 5; HDMI-(1-3) & DVI-I-(1-2), and whilst this box does share 3 of those screens with other boxes, it doesn’t share all 5 & that count is the easiest ā€˜tell’ for this box.. ie. fastfetch (or neofetch in older releases) gives a load of detail that allows me to confirm (pretty well) which box I’m actually typing commands into.

I’m actually running fastfetch (or neofetch) before I do most changes (significant or unique changes to confirm box), but not just after a box has been turned on as I’d expect I know which box I just turned on or woke. I like how it presents its data; but that’s mostly (I think) as I can usually detect the box, even if I’m not wearing my glasses (logo shows Ubuntu, Debian etc, number of display lines etc).

3 Likes

For me, the idea of a ā€œfirstā€ command I use every day doesn’t really fit my habits, because I am not in ā€œwork lifeā€ anymore.

When I was, I did have a canned routine which would

  • verify ā€œupā€ status of a list of ā€œcompute serversā€ for CAD/CAM export

  • verify available disk space of the compute transient files

  • verify that the processes for feeding files to remote DBs and file cashe storage were functional and reporting no glitches

  • generate the statistical chart of times for phases of compute process, including ā€œper item wait in queueā€; ā€œitems in wait queueā€; total MB of data files retrieved for the compute phase; RAM and VM status at regular intervals; numbers of and MB of, data files generated from compute jobs; average total time for compute jobs for different classes of items (Pro/ENG PROP, Pro/Eng PEAM, Catia, Unicad, Versacad) for remote replication. Those charts were also published for viewing by the entire internal engineering/manufacturing organization at Nortel, so that they would get a ā€œpulseā€ of our compute operations and develop a sense of when to expect their jobs to be completed.

So, in home life, I have two personalities, regular user and root, and my command usage ā€œprofileā€ is as follows:

For regular user …

   2273 ls
    881 sync
    752 gvim
    733 cd
    553 .
    237 vi
    221 mv
    211 rm
    176 more
    169 grep
    152 man
    131 chmod
    122 cp
    113 sudo
     92 find
     77 clear

As root user …

   7007 ls
   3697 sync
   3669 cd
   2619 gvim
   1754 .
   1543 man
    861 Admin.sh
    770 more
    625 grep
    546 cp
    536 myDf.sh
    504 mv
    455 rm
    382 cat
    375 find
    362 ./UTIL__SearchIndexes.sh
    349 USER__Find_IndexedFiles.sh
    289 ps
    272 chmod
    262 inxi
    232 diff
    202 history
    199 which
    193 systemctl
    146 echo
    145 HW_Admin__Power_SetFreqCPU.sh
    141 lsblk
    134 apt-get
    125 swapon
4 Likes

I run a lot of commands, and I don’t care if my command aliases are familiar to anyone else or not because they are my aliases, but here’s mine, and then I’ll explain it:
u;d;re

alias u=ā€˜sudo apt-get update; sudo apt-get dist-upgrade;
sudo update-grub;sudo apt-get autoremove’ # I use this to upgrade my system and update my boot loader, then autoremove any software no longer needed.

alias d=ā€˜doom sync; doom upgrade’ # This updates my Doom Emacs configuration.

alias re=ā€˜restartEmacs’ # I have a function in my .bashrc called restartEmacs; the purpose is to start, stop, or restart my Emacs server; in this case, I’m restarting it.

6 Likes

Usually ruptime, to check on the health and uptime of all my machines.

Note - I wrote my own version of ruptime, more secure and able to see machines outside the local lan

4 Likes

When I was using Fedora, the first command I used was topgrade to look for updates and install them … :rofl:

Now I’m using EndeavourOS again, and there is no command I use. After booting into EndeavourOS, I start Arch-Update app to update my system. :wink:

4 Likes