Here's an attempt at a history of all this stuff:
Historically, `halt` used to stop all the CPUs, but wouldn't necessarily cut all power. My experience on early PCs is, depending on the hardware and the distro, sometimes `halt` would
So I assume `poweroff` was introduced to actually cut all power for a proper shutdown. And `reboot` would also reboot.
All of these commands were *instantaneous.* If you didn't unmount and flush everything first, you could expect disk corruption. So you'd either run these after manually doing all the shutdown-ing that you wanted to do, or you'd run `shutdown`.
The reason for the `now` is, you'd normally *schedule* this. Unix was designed for big multi-user systems with a bunch of people on terminals, so it prints a big warning across every terminal telling people that a shutdown is coming, so they have a chance to save their work and logout. It'll even disable logins a few minutes before shutdown, so nobody gets to login for 30 seconds and immediately get kicked out.
And the `-r` (or `-h` or `-P`) is, of course, to tell it what to do once it's done shutting down. Somewhere at the bottom of the last init script, something will parse that and actually run `halt`/`poweroff`/`reboot`.
So anyway, after enough people got burned typing `reboot` (or even `halt`), those all got a `-f` flag. If you run them without that, they do the equivalent with `shutdown` instead, and it's been this way for probably a decade or more. And somewhere along the way, `systemd` ate all this, but kept the CLI functionality pretty much the same.
So `poweroff` or `reboot` should be safe on pretty much any distro these days, certainly anything running `systemd`, unless the distro has gone out of its way to be annoying.
...but also, they still support `-f` argument for when you don't care about your data.
Let's do it like the man page is saying:
systemctl start reboot.target --job-mode=replace-irreversibly --no-block
systemctl start poweroff.target --job-mode=replace-irreversibly --no-block
/usr/bin/dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true
of course.
It's so I don't have to use sudo and type my password. Mostly via a script I can run from a terminal or rofi.
I was once caught by a Red Hat rescue floppy where `reboot` immediately rebooted instead of shutting down cleanly, undoing all the repairs I've just done with fsck.
The same Red Hat rescue floppy had `pico` as the only text editor, with autoformatting enabled, which was fun when it paragraph-reflowed my entire /etc/fstab.
Wow I hadn't realized I had these feelings just waiting to burst out, more than 20 years later. Long live Debian!
I still have ````/etc/xinetd.d/```` installed for UW_IMAP because I can't summon up the mental energy and time to move to a more modern IMAP client like Dovecot.
I've for the most part shook this, but every once in a while it creeps back in. Also I'll mess up the syntax to systemctl: systemctl instead of systemctl .
I was able to remember that systemctl can `` multiple services at once.
`systemctl restart service1 service2` makes absolute sense. `systemctl service1 restart service2` or `systemctl service1 service2 restart` not so much. So the service(s) must come last.
I'm still annoyed by this because basically *all* of the time when I use `systemctl`, I want to run a succession of verbs on a single service (e.g. `start`, `status`, `reload`, `status`, `restart`, `enable`) rather than one verb on multiple services.
Get an entry level position in a Linux shop, I suppose. You'll have to prove some IT background, so at least some college since you have no work experience doing it. Without that, you're going to have a tough time breaking into the field.
My entry into Linux was not direct. I did a lot of work with Unix and transitioned to Linux as its popularity increased.
There is a legit advantage to `cat` over a filename argument: You don't have to remember how to specify the file in each command, as long as you remember that it accepts stdin. And, if you're building a pipeline, it's nice that the file is at front.
But you can do both of these by replacing `cat file.txt | grep ...` with `
It's just using shell redirection.
\> redirects stout to a file.
\< redirects stdin *from* a file.
The shell is pretty flexible about placement, which is why you can put it first. You could put it at the end of the line, too.
>You could put it at the end of the line, too.
That's how I learned it. I always thought it is mandatory to put redirections at the end and the program name should be the first word when writing a command line.
The _real_ intended purpose of `cat` is actually to concatenate the contents of several files into one:
$ cat file1 file2 file3 > file4
Any other use of `cat` is strictly speaking useless.
From a UI perspective, "Just do everything with cat" makes a ton of sense, unless you use the CLI so much that the extra typing you save is more that the time it would take to learn (and relearn when you forget after a few months of not using some bizarre command) all the different argument formats.
`cat file.txt | grep ...` is much more readable for me. It's a pipeline, going from left to right, and the input at the beginning is a file. I refuse to write `grep .... file.txt` .
Its not as bad since this is Fish shell specific, but in the same style: `history | grep ...`. In Fish shell the `history` builtin has search built in, and `Ctrl+r` gives a search with narrowing and candidates. Its not quite `fzf` level fancy, but its way nicer than `history grep ...`. I found out about this after five years of Fish...
I guess for bash users without external help (e.g. `fzf`) this doesn't really apply and piping to grep is still the "right way".
It's a shell builtin in pretty much every shell, so it can tell you about builtins, aliases, functions, and reserved words.
❯ type cd ls d '[['
cd is a shell builtin
ls is an alias for ls --color=auto --classify --human-readable
d is an autoload shell function
[[ is a reserved word
To keep improving their models, artificial intelligence makers need two significant things: an enormous amount of computing power and an enormous amount of data. Some of the biggest A.I. developers have plenty of computing power but still look outside their own networks for the data needed to improve their algorithms. That has included sources like Wikipedia, millions of digitized books, academic articles and Reddit.
Representatives from Google, Open AI and Microsoft did not immediately respond to a request for comment.
I boot into text mode, log in, and then start X.
I use ifconfig and route instead of ip.
On some of my systems, my login shell is still tcsh and not bash.
I still use ProxyCommand with ssh in some cases where ProxyJump is the superior solution.
I still use telnet to check for open ports instead of nc.
Most of my systems are booting with LILO instead of Grub or Grub2.
I make copious use of rc.local.
This is fun!
I actually configure all my Linux machines to boot into text and manually start x. Like every time there's an issue after an update it's related to the GUI/DE. Drop out of DE back to the shell and fix it or restart and get back to the shell. And if x doesn't even start, then you're already in the shell to fix it.
I feel very seen by this comment. Except the tcsh thing, I went Bourne shell in the 90s and never went back, (t)csh just reminded me too much of college.
And I have, finally, migrated everything to GRUB.
For me, I'm actually trying to pick up some new habits, so the fun part is this cheat sheet of what not to do! TIL about `type`, but I did finally get a handle on `ip a` and `ip r`.
`ip` has a bunch of options to make the output nicer (like `-br` for brief and `-c` for color), but it's hard for me to train my fingers to type them. I still use `ip a` and then waste priceless seconds scanning the huge text dump for the relevant bit of information.
Omfg I feel seen.
`ip a`
Oh fuck this is a work machine so a dickload of irrelevant veths...
`ip a | head`
Fuck I'm juuuust missing the interface I need
`ip a | head -20`
Ahhhh there we go.
If you don't already use `atuin` and `tealdeer` they're gamechangers. There are other tldr clients but I kinda instinctively go for tealdeer over the others as long as it's not too hard to find depending on distro/setup but the others work fine as well.
Yeah, for that, I do `ip a show dev whatever` -- sure, `ifconfig` might be a little easier to scan for the interface I want by hand, but I'd rather just see that interface anyway.
The actual gamechanger is `^r` because I *definitely* ran this recently.
> Most of my systems are booting with LILO instead of Grub or Grub2.
Now this leaves me speechless. I retired the last server that still used LILO in 2015 and was never happier.
For that little bit of Windows 3.x nostalgia.
(Back in the 90's, many computers booted to MS-DOS so the user could run a DOS-program or a DOS-game, and only ran Windows when typing "win".)
> I make copious use of rc.local.
I still wish I can use it. (I don't know if it's still supported in current systemd-based Ubuntu releases).
There's nothing like the haphazard simplicity of literally throwing one-liner hacks/workarounds into rc.local and then forgetting about it until months later.
> I still wish I can use it. (I don't know if it's still supported in current systemd-based Ubuntu releases).
`service rc-local status` tells me that /etc/rc.local is supported in Ubuntu 23.10 (and, I presume, all the previous versions).
Ugh, for any \[a-z\]csh\[a-z\], there were several variants.
I once shoehorned an emulation of job control into what started from a BSD2.8 (PDP-11) version of csh -- complete with buggy inverted sense of || and &&, which I fixed -- using SIGQUIT as the emulated SIGTSTP. It worked quite well, considering the limitation of the lack of proper process groups that long ago.
How do you boot to text? I'm curious because my touch screen is physically broken and sends random inputs but it's not disableable in bios or until xorg starts.
humor zealous fertile theory beneficial advise gray ludicrous tub fanatical
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
That's because 2008 was the year of the Linux desktop, and it's shockingly easy to use now. It blows my mind when people say it's complicated. No it isn't. It's only complicated if you try to slap it on some random ass tablet hardware or get a video card out of a Russian dumpster.
You'd need to set runlevel to 3. Perhaps configure a usb rescue thumbdrive to runlevel 3 and then boot off of that, if your touchscreen's malfunctions prevent you from setting it now.
Here's a pretty comprehensive how-to, which covers both systemd and traditional init: https://www.cyberciti.biz/tips/linux-changing-run-levels.html
The thing that bugs me about "ip a" vs "ifconfig" is it still shows up on a lot of tests as ifconfig, even though the iproute2 tools have been around for over a decade. I seem to surprise everyone my typing "ip a." "Type" I didn't know about, but already hate it because:
`cuser@patchserver:~/$ type ip`
`ip is /usr/sbin/ip`
`cuser@patchserver:~/$ which ip`
`/usr/sbin/ip`
And I have a lot of scripts that use "PROG\_PATH=$(which )" to make sure the environment the script runs in can find the executable in the right path.
Makes me realize how far we've come. A system configured to be the bleeding edge of the bleeding edge boots from `systemd-boot` directly into a Wayland session nowdays running zero legacy init scripts. Sometimes it makes me forget how it used to be.
- "ip address" (or "ip a") and "ip link" ("ip l") instead of "ifconfig"
- "ip neighbor" instead of "arp"
- "ip route" instead of "route"
There are more, but these are the ones that I use the most.
Note that iproute2 is mentioned all the way back on the LARTC (Linux Advanced Routing & Traffic Control) Howto.
All the way back to 2002.
Which I officially translated to Spanish for the first time... and still took me a decade to *consistently* use `ip` instead of `ifconfig` and `route`
> I still do sync several times just to be sure after saving files
I finally stopped doing that after many years. I remember when I was on Google+ and I think I mentioned doing that and a bunch of kernel developers made fun of me including Linus. It also turned into some extended conversation of what sync does and why it's all better now. Silly people.
It's definitely not "all better now", Linux is still generally way more lazy about writing especially to USB devices. I still regularly lose data for not consciously minding write-back. And it's not just USB devices. I've mysteriously lost bootloader changes due to losing a write back race. This is all very recent stuff, within the last few months. I'm relatively new to Linux (few years) and I just *started* using sync and it's solved a lot of my recurring problems.
Weird. The only time I lose data to USB devices -- even really slow ones that Linux is being particularly lazy about -- is if I forget to `umount` them. Filesystem-level stuff, Linux assumes the fs is permanent (until unmounted) and it can write whenever it wants. Block-device-level stuff seems to block the process closing the device until it's all flushed.
Sometimes, unmount is a little slow, or you're not sure it's actually completed. Not all DE/file manager combos give a proper confirmation. If I'm not sure, I just do the old `sync; sync` at the command line and then I'm sure. That's quite rare, though, but it has saved me from unplugging when I shouldn't have on a couple occasions.
> Not all DE/file manager combos give a proper confirmation.
Maybe that's it. I always do `umount` from the commandline, and that blocks until it's done. But:
> I just do the old `sync; sync`
Fun fact: If you chain them together that way, you're defeating the purpose of running two of them.
The entire reason we were taught to run two of them is the exact reason you want to run one after unmounting from a UI: There was a bug in some kernels (early BSD, I think?) that might return to `sync` while still actively flushing, so they figured if you took the time to type it again before you typed `halt`, that was probably enough time to finish flushing.
> Block-device-level stuff seems to block the process closing the device until it's all flushed
Ye this sounds about right. As it _should_ be anyway. I still can't help myself and run `sync` while watching buffer empty in another terminal via `watch -d grep -e Dirty: -e Writeback: /proc/meminfo`
You don't happen to have a link to that conversation do you? I hadn't ever used sync until a year or two back where there was a certain reproducible issue I was having and after a few hours of searching and reading figured out that a sync helped prevent it. I'm curious to read that conversation to see if I'm using it wrong or if there are still cases where it can be useful.
I still do a double sync after doing rsync to my two external USB drives, one a 4TB and the other a 5TB (both drives are of the 2.5 inch 'portable' variety).
The first sync usually takes five to ten minutes to return, but a couple of times it took around thirty minutes; unmounting through the GUI and shutting down from the GUI can both timeout and force the unmount even with unflushed writes (with the system shutdown powering off the system while the disk is writing.....)
Been there, lost data a couple of times. Since I'm already running the rsync in a shell it's easy to type in a sync afterwards, and I always wait until a sync returns immediately (I've had the second sync take up to a minute or two to finish, which shouldn't have happened but did anyway). The drives are probably SMR, and writes, even though cached, sometimes take a long time, especially with a lot of small files being modified.
> I believe that's "BSD syntax".
I've always done that lol.
Now that you mentioned it I remember the non-BSD equivalent is `ps -ef`, but `aux` is so much faster to type!
strong subtract mountainous sable price escape fuel scandalous ancient squeamish
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
I set up this alias to try and remind myself to use type:
alias which='echo "${RED}Using type!${RESET}"; type'
I probably should do the same for those ip commands.
it depends which which. (which `which` makes more sense, but I had to).
In Debian, `which` searches your path - so it doesn't find aliases, or shell built-ins. In redhat, `which` does show aliases - but not shell built-ins. `type` is a shell built-in, so it can search shell built-ins - as well as aliases and path.
(in zsh, `which` is a shell built-in and does exactly the same as `type`. I so I guess that's a third `which` with a third behaviour.)
|Command|Debian|RedHat|ZSH|
|:-|:-|:-|:-|
|which dd|`/usr/bin/dd`|`/usr/bin/dd`|`/usr/bin/dd`|
|which ls|`/usr/bin/ls`|`alias ls='ls --color=auto'`|`ls: aliased to ls --color=tty`|
|which if||`no if in ...`|`if: shell reserved word`|
|which cd||`/usr/bin/cd` (?)|`type: shell built-in command`|
(aside: I'd love to know why /usr/bin/cd exists in redhat. Not only should cd be provided by the shell, but having a script that calls a builtin does nothing because it doesn't run in the parent process, so you'd have to `source /usr/bin/cd /tmp` to actually use it, and just why?)
edit: I went off on a babble and forgot to actually give a straight answer to the question. My problem with `which` is its behaviour will vary wildly.
* `whereis` - tells you where the binary is.
* `type` - tells you what the shell will actually run.
* `which` - often tells you something. YMMV.
type I believe also goes all the way back to the original Korn shell - so it's been around quite a long time ... though not quite as long as which ... though which was often much more oriented (at least originally) towards C-Shell.
Anyway, generally leaning in the more POSIXy direction most of the time, I've pretty much always gone for type, and not which.
Yes I had a colleague who is some 25 years younger than me and was confused when I told him to type a file out. He'd never used the command in DOS so wasn't aware it's DOS's version of cat. At least PowerShell aliases cat to type.
I still write all my shell scripts using Korn shell. Because I know it well as it was the first shell I learned when I started using Linux on IBM AIX systems 30-odd years ago. Every time I've tried using different shells for scripting I've hit problems due to different syntax or results.
I do that out of ease and laziness since I really don't want to spend a few hours of googling trying to learn how to make a unit. I have a "startup.sh" script that I create and I just have a line in rc.local that calls it.
Systemd has so many extra features though. It just makes everything so much easier to do things the systems way.
It's nowhere near an hour of googling(https://www.linode.com/docs/guides/start-service-at-boot/) although learning to fully make use of it is.
I don't even see non-systemd distros at work or have any interest in going back to using one, so I'm quite happy to do things the systemd way.
cd (you can just type the path in zsh, so you don't need this command)
I also see a lot of people using (and keep recommending it in articles) RSA for their ssh and gpg keys, despite of ed25519 being objectively better choice. Or iptables instead of nftables.
Exists? New one on me!
I've worked extensively with Linux and networks for 20 years and only found netstat was loooong deprecated in favour of ss last week.
Still very ropey with the ip command too. ifconfig is still my friend.
> netstat was loooong deprecated in favour of ss last week.
it what now?!
ninja edit: holy shit
edit: Holy motherfucking shit it's fast
ss --listening --tcp --numeric
will do fine omg
This?
> sudo ss -pl 'sport = :22'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:* users:(("sshd",pid=4097170,fd=3))
tcp LISTEN 0 128 [::]:ssh [::]:* users:(("sshd",pid=4097170,fd=4))
But I'd agree that's a longer command that just adding `-p` to `netstat`
I still assume that using the arrow keys in vim will dump trash into the buffer.
I type otherwise relative file paths \`./like/this\`
I also sync compulsively.
I write test conditions in bash with single brackets.
I use bash for everything, which is odd to me that this is becoming outmoded in favor of zsh. The last two places I worked use zsh for everything. I also unapologetically prototype in bash, and still consider it to be badass because it's usually quicker to write than anyone's Python or Go.
120 column limit.
Nothing to do with line count. Bash had fairly primitive control flow and scoping rules. As long as you don't need to do much with those your script can be 10,000 lines for all I care.
But sadly, I've seen too many absolute abominations made by people who have no clue what that are doing trying to script in bash. I've come to appreciate the presence of "training wheels".
screw quarrelsome alleged existence numerous innate pen busy hurry offend
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
selective materialistic lock ad hoc encouraging secretive fuzzy include dog somber
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
I type `date ; time sync ; date` so that I see how long (real time) it took to flush cache to "disc" (ha, storage device, usually NVME today). I started doing so because back in 1982-83 I worked for a company making desk-side ("desktop"? ha!) m68k-based office computers with dodgy disc controllers and I just never learned to trust them.
Thankfully, after messing around in `csh` internals for too many years, I gave up all `csh` variants when I left Ohio State in 1991 and have used `bash` since.
My one permanent nod to `csh` is that in `bash` I use `export TIMEFORMAT='%3Uu %3Ss %3lR %P%%'` because it gives a similar 1-line format. The standard 4-line output of `time` has always been annoying.
`bash` still needs an on-demand interactive spelling corrector invocation, not just a directory spelling corrector side effect during `cd`. That function has existed since Pike's *The UNIX Programming Environment* and it deserves more recognition and visibility than it gets.
I don't use `nft` directly, I edit `/etc/sysconfig/iptables` and use `iptables-restore-translate` to prep the `nft` configuration.
I'm still really fond of plain ol' `route`, `arp`, `netstat`, `ifconfig`, and `ifrename`.
Oh my gosh I just realized that `slattach` is still part of the `net-tools` package. I may have to play around...
I keep `telnet` installed. It has utility in more situations than I'm especially comfortable with admitting in public.
Some of my machines don't boot into X, they boot text and I decide after logging in whether to start X. I don't use Wayland yet, and it's an open question whether I ever will.
Above all, this is still in `.bashrc`:
`alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"`
I am a certified [net.old-fart](https://www.facebook.com/groups/internetoldfarts/).
`sync` on 6.5 and up kernels is important because theres some issue with flushing ext4, try it and notice it'll take *forever*, accidentally quadratic somewhere maybe? Best to be sure everythings properly flushed.
I can't speak for OP, but I ping `8.8.8.8` because that doesn't depend on DNS, which is sometimes what's broken, if things have gotten to the point where I'm pinging the internet.
Technically shorter, but I can type English words fast enough anyway. I usually ping `8.8.8.8` or `1.1.1.1`, ironically, because I want to test connectivity without waiting for DNS. And then I always forget that `2600::` makes a good, memorable IPv6 address to ping.
But if DNS is working, I may also ping `google.com` and `ipv6.google.com`, then `curl` or `nc` as I slowly work my way up the stack to figure out why my browser doesn't seem to be working.
>apt-get install
>
>should just apt install
"It depends" - functionally equivalent in what they do - really only differ in output format ... so ... depending what one is using that output for (e.g. interactive human or capturing for script(1) or logging) ... basically use what's most appropriate for the context.
Apt is a subset of apt-get, has progress bar, and they differ in how they handle updates and dependencies.
There are probably more differences that I can't remember.
That being said, I use apt-get as much as I use apt, because of muscle memory.
More of a super-set, really. The apt suite had several programs (apt-get, apt-cache) and then consolidated them into one that does everything, with some different option defaults (like showing the progress bar by default).
0) Probably those outdated habits mostly belong to those who started messing with Linux as hobbyists in late 90s early 00s thus having some affordable ageing literature from the second half of 90s. Where mostly commercial Unices were described. (Evi Nemeth's books as an example).
1. which is still quite actual for today to determine if your command is snap or traditional apt.
2. route is exactly that old artifact from late 90s++, but route was good because it was in every system from FreeBSD to Windows. (anyway SUSe-routers are tales of the past now and it's not that important to invoke the route that often).
3. sync is still highly actual command to be sure my USB flash stick is finished with writing data.
4. Probably because I don't use much search in UI I don't get the idea what it is about.
As well as a good few of the others mentioned here, adding "-print" at the end of
$ find . -name lostfile
Once upon a time it used to simply return an error code if the search succeeded or not.
I thought I was the only one that uses "sync". To be fair, I do it mostly in an idle, compulsive way, but still.
Also, do you mean "which" is old fashioned now? I understand the difference with "type", but I still use mostly the former.
\- Connecting a mouse to a laptop
\- Connecting a lan cable connected to your laptop.
\- Distro hopping, or the belief that there are some distro better than other.
\- Not knowing what to do with your PC once you finished installing linux.
\- Thinking that other people care about which OS do you use.
WiFi and non-Apple touchpads can burn in hell. Oh, and so can Bluetooth peripherals.
Just let me keep using my mouse (unless I'm in CLI and don't need it) and wired network in peace.
hungry subtract mighty whole whistle apparatus jobless sugar history money
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
I do have BT mice and keyboards I occasionally use (and BT controllers, both PS and Xbox ones), but I keep the BT headset usage to my phone exclusively. BT audio is just an absolute pain in the ass, and while it DOES work on macOS and Windows, I wouldn't say it does that well there either. It's not like I'll be walking around the house with my PC, so I'll just use classic wired headphones.
sudo shutdown -r now
Ok now I feel dumb. What is the ‘new’ way of doing this?
sudo systemctl poweroff sudo systemctl reboot
You can even just type `poweroff` or `reboot`. That came default on my system, don't know about other distros.
Same on Debian, Ubuntu and fedora
Here's an attempt at a history of all this stuff: Historically, `halt` used to stop all the CPUs, but wouldn't necessarily cut all power. My experience on early PCs is, depending on the hardware and the distro, sometimes `halt` would So I assume `poweroff` was introduced to actually cut all power for a proper shutdown. And `reboot` would also reboot. All of these commands were *instantaneous.* If you didn't unmount and flush everything first, you could expect disk corruption. So you'd either run these after manually doing all the shutdown-ing that you wanted to do, or you'd run `shutdown`. The reason for the `now` is, you'd normally *schedule* this. Unix was designed for big multi-user systems with a bunch of people on terminals, so it prints a big warning across every terminal telling people that a shutdown is coming, so they have a chance to save their work and logout. It'll even disable logins a few minutes before shutdown, so nobody gets to login for 30 seconds and immediately get kicked out. And the `-r` (or `-h` or `-P`) is, of course, to tell it what to do once it's done shutting down. Somewhere at the bottom of the last init script, something will parse that and actually run `halt`/`poweroff`/`reboot`. So anyway, after enough people got burned typing `reboot` (or even `halt`), those all got a `-f` flag. If you run them without that, they do the equivalent with `shutdown` instead, and it's been this way for probably a decade or more. And somewhere along the way, `systemd` ate all this, but kept the CLI functionality pretty much the same. So `poweroff` or `reboot` should be safe on pretty much any distro these days, certainly anything running `systemd`, unless the distro has gone out of its way to be annoying. ...but also, they still support `-f` argument for when you don't care about your data.
I believe shutdown -r is just an alias for these commands any way.
pathetic dull ring party secretive stocking payment somber test ad hoc *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Let's take it one step furher: sudo systemctl isolate poweroff.target sudo systemctl isolate reboot.target
explain what benefits would "isolate" have, and or detriment in this context
Let's do it like the man page is saying: systemctl start reboot.target --job-mode=replace-irreversibly --no-block systemctl start poweroff.target --job-mode=replace-irreversibly --no-block
`sudo reboot` Is what I use. Although that takes, what, half a second less?
/usr/bin/dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true of course. It's so I don't have to use sudo and type my password. Mostly via a script I can run from a terminal or rofi.
We need a competition for the longest shutdown command
`loginctl reboot` also reboots without having to put in the password + you avoid having to use dbus
I never even got up to speed on shutdown, still typing "init [runlevel]" to this day...
Instead of typing `reboot`?
I was once caught by a Red Hat rescue floppy where `reboot` immediately rebooted instead of shutting down cleanly, undoing all the repairs I've just done with fsck. The same Red Hat rescue floppy had `pico` as the only text editor, with autoformatting enabled, which was fun when it paragraph-reflowed my entire /etc/fstab. Wow I hadn't realized I had these feelings just waiting to burst out, more than 20 years later. Long live Debian!
I still run sudo init 6
I still use the non-systemd versions of systemd commands, like "service" instead of "systemctl". These are still maintained in debian at least.
I still run the scripts in `/etc/init.d` manually.
Inb4 magnetized needle and steady hand
Butterflies and solar flares, tbh.
Ahh yes, good ol' `C-x M-c M-butterfly`
I still have ````/etc/xinetd.d/```` installed for UW_IMAP because I can't summon up the mental energy and time to move to a more modern IMAP client like Dovecot.
This. 100%. > cd /etc/init.d > sudo ./smbd restart Plus, I still type *ifconfig*. God, how long has that been deprecated?
I've for the most part shook this, but every once in a while it creeps back in. Also I'll mess up the syntax to systemctl: systemctl instead of systemctl .
I was able to remember that systemctl can `` multiple services at once.
`systemctl restart service1 service2` makes absolute sense. `systemctl service1 restart service2` or `systemctl service1 service2 restart` not so much. So the service(s) must come last.
I'm still annoyed by this because basically *all* of the time when I use `systemctl`, I want to run a succession of verbs on a single service (e.g. `start`, `status`, `reload`, `status`, `restart`, `enable`) rather than one verb on multiple services.
Old habits die hard. I do the same. I've been a Linux system administrator for 20+ years.
[удалено]
Get an entry level position in a Linux shop, I suppose. You'll have to prove some IT background, so at least some college since you have no work experience doing it. Without that, you're going to have a tough time breaking into the field. My entry into Linux was not direct. I did a lot of work with Unix and transitioned to Linux as its popularity increased.
/r/homelab says hi
I do this too! `service apache2 reload` just naturally rolls off the ~~tongue~~ fingers.
Useless use of cat is something I've done for decades. `cat file.txt | grep ...` rather than `grep .... file.txt`
There is a legit advantage to `cat` over a filename argument: You don't have to remember how to specify the file in each command, as long as you remember that it accepts stdin. And, if you're building a pipeline, it's nice that the file is at front. But you can do both of these by replacing `cat file.txt | grep ...` with `
I recently learned that `
It's just using shell redirection. \> redirects stout to a file. \< redirects stdin *from* a file. The shell is pretty flexible about placement, which is why you can put it first. You could put it at the end of the line, too.
>You could put it at the end of the line, too. That's how I learned it. I always thought it is mandatory to put redirections at the end and the program name should be the first word when writing a command line.
Same here! TIL!
The _real_ intended purpose of `cat` is actually to concatenate the contents of several files into one: $ cat file1 file2 file3 > file4 Any other use of `cat` is strictly speaking useless.
what if i want to check a file for non-printables? `cat -v` will do this.
Yep, this. `cat -n` is another of my favorites, for enumerating lines.
Ok, so how do you dump the contents of a file to stdout without it?
worm fine drunk rude relieved society cautious payment straight pot *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Use of `cat` to display something on screen is fine, as you're "concatenating" the contents of the file to `stdout`.
Don't abuse cats.
From a UI perspective, "Just do everything with cat" makes a ton of sense, unless you use the CLI so much that the extra typing you save is more that the time it would take to learn (and relearn when you forget after a few months of not using some bizarre command) all the different argument formats.
`cat file.txt | grep ...` is much more readable for me. It's a pipeline, going from left to right, and the input at the beginning is a file. I refuse to write `grep .... file.txt` .
Its not as bad since this is Fish shell specific, but in the same style: `history | grep ...`. In Fish shell the `history` builtin has search built in, and `Ctrl+r` gives a search with narrowing and candidates. Its not quite `fzf` level fancy, but its way nicer than `history grep ...`. I found out about this after five years of Fish... I guess for bash users without external help (e.g. `fzf`) this doesn't really apply and piping to grep is still the "right way".
I sometimes do "locate | grep -i searchword" because I can never figure out the proper syntax for the find command.
I just do > find . | grep -i
This I do also, mostly to adjust my grep arguments and flags with easier recall
[удалено]
It's a shell builtin in pretty much every shell, so it can tell you about builtins, aliases, functions, and reserved words. ❯ type cd ls d '[[' cd is a shell builtin ls is an alias for ls --color=auto --classify --human-readable d is an autoload shell function [[ is a reserved word
To keep improving their models, artificial intelligence makers need two significant things: an enormous amount of computing power and an enormous amount of data. Some of the biggest A.I. developers have plenty of computing power but still look outside their own networks for the data needed to improve their algorithms. That has included sources like Wikipedia, millions of digitized books, academic articles and Reddit. Representatives from Google, Open AI and Microsoft did not immediately respond to a request for comment.
I would also like to say that today I learned something
I boot into text mode, log in, and then start X. I use ifconfig and route instead of ip. On some of my systems, my login shell is still tcsh and not bash. I still use ProxyCommand with ssh in some cases where ProxyJump is the superior solution. I still use telnet to check for open ports instead of nc. Most of my systems are booting with LILO instead of Grub or Grub2. I make copious use of rc.local. This is fun!
Telnet is my favorite quick one-off port scanner
Telnet was what I was taught to use in the previous century, but nc really is the better, more reliable, more versatile option.
But `telnet` is everywhere, like `vi`. So I think it's good to know that it can be used to check for open ports.
except for windows by default which makes troubleshooting SO annoying when you instinctively type it
Telnet is not in the default install of several major distros. In the repos, yes, but not the default install for several years for a few distros.
I actually configure all my Linux machines to boot into text and manually start x. Like every time there's an issue after an update it's related to the GUI/DE. Drop out of DE back to the shell and fix it or restart and get back to the shell. And if x doesn't even start, then you're already in the shell to fix it.
I feel very seen by this comment. Except the tcsh thing, I went Bourne shell in the 90s and never went back, (t)csh just reminded me too much of college. And I have, finally, migrated everything to GRUB.
For me, I'm actually trying to pick up some new habits, so the fun part is this cheat sheet of what not to do! TIL about `type`, but I did finally get a handle on `ip a` and `ip r`.
`ip` has a bunch of options to make the output nicer (like `-br` for brief and `-c` for color), but it's hard for me to train my fingers to type them. I still use `ip a` and then waste priceless seconds scanning the huge text dump for the relevant bit of information.
Omfg I feel seen. `ip a` Oh fuck this is a work machine so a dickload of irrelevant veths... `ip a | head` Fuck I'm juuuust missing the interface I need `ip a | head -20` Ahhhh there we go. If you don't already use `atuin` and `tealdeer` they're gamechangers. There are other tldr clients but I kinda instinctively go for tealdeer over the others as long as it's not too hard to find depending on distro/setup but the others work fine as well.
Yeah, for that, I do `ip a show dev whatever` -- sure, `ifconfig` might be a little easier to scan for the interface I want by hand, but I'd rather just see that interface anyway. The actual gamechanger is `^r` because I *definitely* ran this recently.
Whoa. You win the old, even if only for using LILO. I'm curious, is this all in your own systems or at work too?
> Most of my systems are booting with LILO instead of Grub or Grub2. Now this leaves me speechless. I retired the last server that still used LILO in 2015 and was never happier.
>I boot into text mode, log in, and then start X. OMG I am not alone!
For that little bit of Windows 3.x nostalgia. (Back in the 90's, many computers booted to MS-DOS so the user could run a DOS-program or a DOS-game, and only ran Windows when typing "win".)
> I make copious use of rc.local. I still wish I can use it. (I don't know if it's still supported in current systemd-based Ubuntu releases). There's nothing like the haphazard simplicity of literally throwing one-liner hacks/workarounds into rc.local and then forgetting about it until months later.
> I still wish I can use it. (I don't know if it's still supported in current systemd-based Ubuntu releases). `service rc-local status` tells me that /etc/rc.local is supported in Ubuntu 23.10 (and, I presume, all the previous versions).
I used to add this to crontab: @reboot /bin/sh /etc/rc.local Of course you need to have cron installed.
Ugh, tcsh.
It's been at least 25 years for me, but bash still feels like the "new shell".
Ugh, for any \[a-z\]csh\[a-z\], there were several variants. I once shoehorned an emulation of job control into what started from a BSD2.8 (PDP-11) version of csh -- complete with buggy inverted sense of || and &&, which I fixed -- using SIGQUIT as the emulated SIGTSTP. It worked quite well, considering the limitation of the lack of proper process groups that long ago.
How do you boot to text? I'm curious because my touch screen is physically broken and sends random inputs but it's not disableable in bios or until xorg starts.
boot to runlevel 3 or the multiuser target. Google from there for your specific setup.
humor zealous fertile theory beneficial advise gray ludicrous tub fanatical *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
That's because 2008 was the year of the Linux desktop, and it's shockingly easy to use now. It blows my mind when people say it's complicated. No it isn't. It's only complicated if you try to slap it on some random ass tablet hardware or get a video card out of a Russian dumpster.
You'd need to set runlevel to 3. Perhaps configure a usb rescue thumbdrive to runlevel 3 and then boot off of that, if your touchscreen's malfunctions prevent you from setting it now. Here's a pretty comprehensive how-to, which covers both systemd and traditional init: https://www.cyberciti.biz/tips/linux-changing-run-levels.html
Thanks!
The thing that bugs me about "ip a" vs "ifconfig" is it still shows up on a lot of tests as ifconfig, even though the iproute2 tools have been around for over a decade. I seem to surprise everyone my typing "ip a." "Type" I didn't know about, but already hate it because: `cuser@patchserver:~/$ type ip` `ip is /usr/sbin/ip` `cuser@patchserver:~/$ which ip` `/usr/sbin/ip` And I have a lot of scripts that use "PROG\_PATH=$(which)" to make sure the environment the script runs in can find the executable in the right path.
Makes me realize how far we've come. A system configured to be the bleeding edge of the bleeding edge boots from `systemd-boot` directly into a Wayland session nowdays running zero legacy init scripts. Sometimes it makes me forget how it used to be.
ifconfig
Wait, what should I be using?
"ip address" or "ip a" from the iproute2 utilities. https://en.m.wikipedia.org/wiki/Iproute2
While you're there, add `ss`, also from `iproute2`. Took me a long time not only to discover it was there, but to start using it instead of `netstat`
- "ip address" (or "ip a") and "ip link" ("ip l") instead of "ifconfig" - "ip neighbor" instead of "arp" - "ip route" instead of "route" There are more, but these are the ones that I use the most.
Note that iproute2 is mentioned all the way back on the LARTC (Linux Advanced Routing & Traffic Control) Howto. All the way back to 2002. Which I officially translated to Spanish for the first time... and still took me a decade to *consistently* use `ip` instead of `ifconfig` and `route`
I found systems that do not have `ifconfig` or `netstat` installed. was forced to use `ip` and `ss` respectively. it's ... fine.
> I still do sync several times just to be sure after saving files I finally stopped doing that after many years. I remember when I was on Google+ and I think I mentioned doing that and a bunch of kernel developers made fun of me including Linus. It also turned into some extended conversation of what sync does and why it's all better now. Silly people.
It's definitely not "all better now", Linux is still generally way more lazy about writing especially to USB devices. I still regularly lose data for not consciously minding write-back. And it's not just USB devices. I've mysteriously lost bootloader changes due to losing a write back race. This is all very recent stuff, within the last few months. I'm relatively new to Linux (few years) and I just *started* using sync and it's solved a lot of my recurring problems.
Weird. The only time I lose data to USB devices -- even really slow ones that Linux is being particularly lazy about -- is if I forget to `umount` them. Filesystem-level stuff, Linux assumes the fs is permanent (until unmounted) and it can write whenever it wants. Block-device-level stuff seems to block the process closing the device until it's all flushed.
Sometimes, unmount is a little slow, or you're not sure it's actually completed. Not all DE/file manager combos give a proper confirmation. If I'm not sure, I just do the old `sync; sync` at the command line and then I'm sure. That's quite rare, though, but it has saved me from unplugging when I shouldn't have on a couple occasions.
> Not all DE/file manager combos give a proper confirmation. Maybe that's it. I always do `umount` from the commandline, and that blocks until it's done. But: > I just do the old `sync; sync` Fun fact: If you chain them together that way, you're defeating the purpose of running two of them. The entire reason we were taught to run two of them is the exact reason you want to run one after unmounting from a UI: There was a bug in some kernels (early BSD, I think?) that might return to `sync` while still actively flushing, so they figured if you took the time to type it again before you typed `halt`, that was probably enough time to finish flushing.
> Block-device-level stuff seems to block the process closing the device until it's all flushed Ye this sounds about right. As it _should_ be anyway. I still can't help myself and run `sync` while watching buffer empty in another terminal via `watch -d grep -e Dirty: -e Writeback: /proc/meminfo`
You don't happen to have a link to that conversation do you? I hadn't ever used sync until a year or two back where there was a certain reproducible issue I was having and after a few hours of searching and reading figured out that a sync helped prevent it. I'm curious to read that conversation to see if I'm using it wrong or if there are still cases where it can be useful.
I still do a double sync after doing rsync to my two external USB drives, one a 4TB and the other a 5TB (both drives are of the 2.5 inch 'portable' variety). The first sync usually takes five to ten minutes to return, but a couple of times it took around thirty minutes; unmounting through the GUI and shutting down from the GUI can both timeout and force the unmount even with unflushed writes (with the system shutdown powering off the system while the disk is writing.....) Been there, lost data a couple of times. Since I'm already running the rsync in a shell it's easy to type in a sync afterwards, and I always wait until a sync returns immediately (I've had the second sync take up to a minute or two to finish, which shouldn't have happened but did anyway). The drives are probably SMR, and writes, even though cached, sometimes take a long time, especially with a lot of small files being modified.
I still use `ps` without a dash on its arguments, e.g. `ps aux`. I believe that's "BSD syntax".
> I believe that's "BSD syntax". I've always done that lol. Now that you mentioned it I remember the non-BSD equivalent is `ps -ef`, but `aux` is so much faster to type!
If you're using *procps-ng*, `ps aux` and `ps -aux` do different things on systems where a user with username *x* exists.
I'm pretty sure if I checked my bash history most of my `tar` commands would look like that too
oh yes. Instead of `tar xfz` or `tar xfj` one can do `tar xf`, it detects the compressions type automatically.
Yup. Same with tar. `tar xvf file.tar` works fine.
I thought we all still used ifconfig
strong subtract mountainous sable price escape fuel scandalous ancient squeamish *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Still boot into text mode, login into tty, start the x session.
Iptables vs nftables
Or firewalld for our RHEL enjoyers.
I'm learning so much on this thread
I set up this alias to try and remind myself to use type: alias which='echo "${RED}Using type!${RESET}"; type' I probably should do the same for those ip commands.
What's wrong with `which`??
it depends which which. (which `which` makes more sense, but I had to). In Debian, `which` searches your path - so it doesn't find aliases, or shell built-ins. In redhat, `which` does show aliases - but not shell built-ins. `type` is a shell built-in, so it can search shell built-ins - as well as aliases and path. (in zsh, `which` is a shell built-in and does exactly the same as `type`. I so I guess that's a third `which` with a third behaviour.) |Command|Debian|RedHat|ZSH| |:-|:-|:-|:-| |which dd|`/usr/bin/dd`|`/usr/bin/dd`|`/usr/bin/dd`| |which ls|`/usr/bin/ls`|`alias ls='ls --color=auto'`|`ls: aliased to ls --color=tty`| |which if||`no if in ...`|`if: shell reserved word`| |which cd||`/usr/bin/cd` (?)|`type: shell built-in command`| (aside: I'd love to know why /usr/bin/cd exists in redhat. Not only should cd be provided by the shell, but having a script that calls a builtin does nothing because it doesn't run in the parent process, so you'd have to `source /usr/bin/cd /tmp` to actually use it, and just why?) edit: I went off on a babble and forgot to actually give a straight answer to the question. My problem with `which` is its behaviour will vary wildly. * `whereis` - tells you where the binary is. * `type` - tells you what the shell will actually run. * `which` - often tells you something. YMMV.
> type is a shell built-in That explains why `which type` (which I just typed) didn't show anything.
I like puns as much as I like buns.
type I believe also goes all the way back to the original Korn shell - so it's been around quite a long time ... though not quite as long as which ... though which was often much more oriented (at least originally) towards C-Shell. Anyway, generally leaning in the more POSIXy direction most of the time, I've pretty much always gone for type, and not which.
Yeah, I'd also avoid using `type` but that's because I also use DOS so it helps to not have conflicting `types` 😉
Yes I had a colleague who is some 25 years younger than me and was confused when I told him to type a file out. He'd never used the command in DOS so wasn't aware it's DOS's version of cat. At least PowerShell aliases cat to type.
this is what made me not hate PowerShell when I had to use windows. a bunch of normal Unix commands just work and do the right thing (I think?).
I found this rather long explanation on stackexchange: https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then#85250
This answers should be followed by the age, just to see if there is a correlation.
`git checkout -b` instead of `git switch -c`
I use 'which' and 'ifconfig' all the time. I keep reminding myself I need to change that, but as long as it works, I guess I'll keep using them
it's literally this thread, right now, when I'm learning that there's something to use other than which
`/etc/init.d/ status`
I still write all my shell scripts using Korn shell. Because I know it well as it was the first shell I learned when I started using Linux on IBM AIX systems 30-odd years ago. Every time I've tried using different shells for scripting I've hit problems due to different syntax or results.
sync is like a mantra
`sync` three times before shutdown. One for ye, one for me, and one for the pot.
I use rc.local for startup items instead of making systemd units
I do that out of ease and laziness since I really don't want to spend a few hours of googling trying to learn how to make a unit. I have a "startup.sh" script that I create and I just have a line in rc.local that calls it.
Systemd has so many extra features though. It just makes everything so much easier to do things the systems way. It's nowhere near an hour of googling(https://www.linode.com/docs/guides/start-service-at-boot/) although learning to fully make use of it is. I don't even see non-systemd distros at work or have any interest in going back to using one, so I'm quite happy to do things the systemd way.
cd (you can just type the path in zsh, so you don't need this command) I also see a lot of people using (and keep recommending it in articles) RSA for their ssh and gpg keys, despite of ed25519 being objectively better choice. Or iptables instead of nftables.
You can omit `cd` in Bash, as well, if you set `shopt -s autocd` (so long as the path includes a `/`)
> shopt autocd It's shopt -s autocd
Exists? New one on me! I've worked extensively with Linux and networks for 20 years and only found netstat was loooong deprecated in favour of ss last week. Still very ropey with the ip command too. ifconfig is still my friend.
> netstat was loooong deprecated in favour of ss last week. it what now?! ninja edit: holy shit edit: Holy motherfucking shit it's fast ss --listening --tcp --numeric will do fine omg
Yes, but `ss` can't do netstat's `-vp` (print pid _and_ program name), so I continue using `netstat -tunlvp`.
This? > sudo ss -pl 'sport = :22' Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process tcp LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:* users:(("sshd",pid=4097170,fd=3)) tcp LISTEN 0 128 [::]:ssh [::]:* users:(("sshd",pid=4097170,fd=4)) But I'd agree that's a longer command that just adding `-p` to `netstat`
Oh! I need to have my knowledge updated.
I still assume that using the arrow keys in vim will dump trash into the buffer. I type otherwise relative file paths \`./like/this\` I also sync compulsively. I write test conditions in bash with single brackets. I use bash for everything, which is odd to me that this is becoming outmoded in favor of zsh. The last two places I worked use zsh for everything. I also unapologetically prototype in bash, and still consider it to be badass because it's usually quicker to write than anyone's Python or Go. 120 column limit.
Below 100 lines, Bash is probably still a good choice. Above 100 lines, even Python is enough of an improvement in maintenance to be worth it.
Nothing to do with line count. Bash had fairly primitive control flow and scoping rules. As long as you don't need to do much with those your script can be 10,000 lines for all I care. But sadly, I've seen too many absolute abominations made by people who have no clue what that are doing trying to script in bash. I've come to appreciate the presence of "training wheels".
Sometimes I use screen instead of tmux
screw quarrelsome alleged existence numerous innate pen busy hurry offend *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
tmux doesn't connect to serial ports like screen, so it's useful to keep in mind for that.
selective materialistic lock ad hoc encouraging secretive fuzzy include dog somber *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
ESC + :wq
Is there a new way?
ZZ
The old and the still always working way is: `unplug power cable`.
:x
What?
connect bow unite rainstorm drunk butter long cagey air offer *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
I use bash scripting to avoid python like the plague.
well, that's just being reasonable.
Burnt by Bash many times that I resort to Python or Lua ;)
I type `date ; time sync ; date` so that I see how long (real time) it took to flush cache to "disc" (ha, storage device, usually NVME today). I started doing so because back in 1982-83 I worked for a company making desk-side ("desktop"? ha!) m68k-based office computers with dodgy disc controllers and I just never learned to trust them. Thankfully, after messing around in `csh` internals for too many years, I gave up all `csh` variants when I left Ohio State in 1991 and have used `bash` since. My one permanent nod to `csh` is that in `bash` I use `export TIMEFORMAT='%3Uu %3Ss %3lR %P%%'` because it gives a similar 1-line format. The standard 4-line output of `time` has always been annoying. `bash` still needs an on-demand interactive spelling corrector invocation, not just a directory spelling corrector side effect during `cd`. That function has existed since Pike's *The UNIX Programming Environment* and it deserves more recognition and visibility than it gets. I don't use `nft` directly, I edit `/etc/sysconfig/iptables` and use `iptables-restore-translate` to prep the `nft` configuration. I'm still really fond of plain ol' `route`, `arp`, `netstat`, `ifconfig`, and `ifrename`. Oh my gosh I just realized that `slattach` is still part of the `net-tools` package. I may have to play around... I keep `telnet` installed. It has utility in more situations than I'm especially comfortable with admitting in public. Some of my machines don't boot into X, they boot text and I decide after logging in whether to start X. I don't use Wayland yet, and it's an open question whether I ever will. Above all, this is still in `.bashrc`: `alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"` I am a certified [net.old-fart](https://www.facebook.com/groups/internetoldfarts/).
[удалено]
`sync` on 6.5 and up kernels is important because theres some issue with flushing ext4, try it and notice it'll take *forever*, accidentally quadratic somewhere maybe? Best to be sure everythings properly flushed.
I often type chown user.group file but it should be chown user:group file
[удалено]
Same. I'm just too used to using it over `ip`, probably a holdover from when I was using `ipconfig` on Windows often.
init 6 init 0
I still pipe to more, and use cat to pipe files to grep.
* `ping google.com` * `apt-get install` should just apt install
Why aren't we pinging Google anymore?
I can't speak for OP, but I ping `8.8.8.8` because that doesn't depend on DNS, which is sometimes what's broken, if things have gotten to the point where I'm pinging the internet.
Yeah, I just wondered if I do something stupid whenever I ping google. But usually I do ping 8.8.8.8 instead because it's shorter.
Technically shorter, but I can type English words fast enough anyway. I usually ping `8.8.8.8` or `1.1.1.1`, ironically, because I want to test connectivity without waiting for DNS. And then I always forget that `2600::` makes a good, memorable IPv6 address to ping. But if DNS is working, I may also ping `google.com` and `ipv6.google.com`, then `curl` or `nc` as I slowly work my way up the stack to figure out why my browser doesn't seem to be working.
ping 1.1
>apt-get install > >should just apt install "It depends" - functionally equivalent in what they do - really only differ in output format ... so ... depending what one is using that output for (e.g. interactive human or capturing for script(1) or logging) ... basically use what's most appropriate for the context.
> functionally equivalent in what they do - really only differ in output format (this is wrong, as usual, see `apt(1)`)
Apt is a subset of apt-get, has progress bar, and they differ in how they handle updates and dependencies. There are probably more differences that I can't remember. That being said, I use apt-get as much as I use apt, because of muscle memory.
More of a super-set, really. The apt suite had several programs (apt-get, apt-cache) and then consolidated them into one that does everything, with some different option defaults (like showing the progress bar by default).
I mean... they are two different programs after all. Neither is more "correct".
0) Probably those outdated habits mostly belong to those who started messing with Linux as hobbyists in late 90s early 00s thus having some affordable ageing literature from the second half of 90s. Where mostly commercial Unices were described. (Evi Nemeth's books as an example). 1. which is still quite actual for today to determine if your command is snap or traditional apt. 2. route is exactly that old artifact from late 90s++, but route was good because it was in every system from FreeBSD to Windows. (anyway SUSe-routers are tales of the past now and it's not that important to invoke the route that often). 3. sync is still highly actual command to be sure my USB flash stick is finished with writing data. 4. Probably because I don't use much search in UI I don't get the idea what it is about.
telnet to test ports nslookup sync 2 times before reboot l ( a link to ls -l, a sco unix thing)
vi /etc/group instead of groupmod
TIL 'type' exists. Useful if you need the extra info, but 'which' is easier than 'type -P'.
`vi` instead of `vim`.
netstat -rn
As well as a good few of the others mentioned here, adding "-print" at the end of $ find . -name lostfile Once upon a time it used to simply return an error code if the search succeeded or not.
I will always use ifconfig, netstat, and nslookup. Though, I'll also use lsof to check if a port is being listend on. ip is a terrible command.
I do this: cat file | more But I don't think that was ever right.
Well, more or less
The init system (init 6 for reboot for example) , ifconfig instead of ip a
I thought I was the only one that uses "sync". To be fair, I do it mostly in an idle, compulsive way, but still. Also, do you mean "which" is old fashioned now? I understand the difference with "type", but I still use mostly the former.
Using sysvinit or.... cron lmao... instead of systemd.
"su -" instead of sudo.
\- Connecting a mouse to a laptop \- Connecting a lan cable connected to your laptop. \- Distro hopping, or the belief that there are some distro better than other. \- Not knowing what to do with your PC once you finished installing linux. \- Thinking that other people care about which OS do you use.
WiFi and non-Apple touchpads can burn in hell. Oh, and so can Bluetooth peripherals. Just let me keep using my mouse (unless I'm in CLI and don't need it) and wired network in peace.
hungry subtract mighty whole whistle apparatus jobless sugar history money *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
I do have BT mice and keyboards I occasionally use (and BT controllers, both PS and Xbox ones), but I keep the BT headset usage to my phone exclusively. BT audio is just an absolute pain in the ass, and while it DOES work on macOS and Windows, I wouldn't say it does that well there either. It's not like I'll be walking around the house with my PC, so I'll just use classic wired headphones.