šŸ’¾ Archived View for dioskouroi.xyz ā€ŗ thread ā€ŗ 24995352 captured on 2020-11-07 at 00:49:11. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

The Linux Commands HandBook

Author: ekianjo

Score: 134

Comments: 42

Date: 2020-11-05 03:19:36

Web Link

________________________________________________________________________________

red_admiral wrote at 2020-11-05 11:56:34:

Several red flags here.

First, I have to fill in a form and confirm an e-mail subscription before I can download the PDF. For reference, the real download link is

https://flaviocopes.nyc3.digitaloceanspaces.com/linux-comman...

Secondly, "No one can dictate which apps you can run, or ā€œcall homeā€ with apps that track you, your position, and more."

Everything from ubuntu's amazon lens integration to android to firefox' pocket integration comes to mind. Yes, technically you can rebuild all these things from source and strip out the parts you don't like - don't like google tracking you? Chromium is open source, just edit the tracking out and build your own!

Practically speaking just about no-one can manage that. You have to either live with what you're offered or go to a lot of effort and practically have a degree in CS or equivalent. The author here has a very simplistic view of the world.

This sounds like a moderate-at-best quality article written to farm newsletter subscriptions. Could be better.

thefz wrote at 2020-11-05 12:49:42:

> Linux is an operating system, like macOS or Windows.

Nup, it's just a kernel.

emilecantin wrote at 2020-11-05 13:47:44:

I'd just like to interject for moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!

(

https://www.lurkmore.com/view/GNU/Linux_interjection

)

johnr2 wrote at 2020-11-05 14:44:01:

> All the so-called Linux distributions are really distributions of GNU/Linux!

s/All/Most

Alpine Linux uses musl libc and busybox, for example.

zepto wrote at 2020-11-06 02:00:22:

This just isnā€™t really true from a linguistic point of view any more.

Most people use Linux to mean one of many full operating system distributions, and then refer to the kernel as ā€˜the Linux kernelā€™. Gnu gets referred to in relation to the many tools. Thatā€™s just how the language has worked out.

The comment is certainly true in terms of who contributed various components, although many distributions do increasingly contain critical components that have nothing to do with GNU.

Alekhine wrote at 2020-11-06 06:58:24:

You're being trolled. The comment you replied to is a copy paste of an oft-mocked post made by Richard Stallman. People post it in Linux threads to make fun of his pedantry and his perceived bitterness over Linux becoming the dominant kernel over GNU Hurd.

zepto wrote at 2020-11-06 15:14:59:

Troll successful!

I knew it was Stallmanā€™s bitterness. I just didnā€™t know it was a copy/paste!

twojacobtwo wrote at 2020-11-05 15:45:33:

Thank you for the excellent explanation! I have always referred to Linux as an operating system and I will be more careful with that nuance. I was one of today's 10,000 [0].

[0]

https://xkcd.com/1053/

(Ten Thousand)

Alekhine wrote at 2020-11-06 06:58:39:

You're being trolled. The comment you replied to is a copy paste of an oft-mocked post made by Richard Stallman. People post it in Linux threads to make fun of his pedantry and his perceived bitterness over Linux becoming the dominant kernel over GNU Hurd

swiley wrote at 2020-11-05 14:04:07:

icecat has all the tracking stuff from Firefox removed. If you're willing to put up with the "purists" from eg the FSF you get a lot of benefits like not having your software track you or do things you don't like because the dark pattern works with some sales funnel etc.

megous wrote at 2020-11-05 13:37:10:

It's not that hard in Arch Linux. You get the PKGBUILD for original package, and run makepkg once with an option to just prepare the src/, then you can modify it and then you run makepkg with a flag to skip the src/ preparation and finish the build.

Just to change the build/configure flags, you can simply edit the PKGBUILD.

Nothing fancy, I've been building firefox this way to disable signing requirements for extensions, until I gave up on firefox extensions completely, because of the general unfriendliness to developers with the signing requirements that can't be disabled without wasting a shitton of electricity.

roryrjb wrote at 2020-11-05 07:58:14:

Yeah this is _OK_, but running macOS commands for Linux deployments doesn't work all the time. What about `lsblk` or `ip`? Also md5 vs md5sum. Also and I don't have macOS handy to try it, I'm pretty sure grep has differing options. I can't count how many times friends and colleagues who use macOS for development have put BSD commands into Dockerfiles and CI pipelines and have wondered why it didn't work.

Fnoord wrote at 2020-11-05 12:57:24:

Your criticism is valid, but its possible to get compatibility between macOS (or another BSD) and Linux. GNU utilities are already mentioned but there's also, for example,

> What about `lsblk` or `ip`?

For a (partly compatible) equivalent to _ip_ I can recommend _iproute2mac_ [1]. You can also use the old utilities from BSD (_ifconfig_, _route_, etc) or the GUI.

For _lsblk_ I found no drop-in replacement, just equivalents [2]

On top of that, Nix works on Linux and macOS.

[1]

https://github.com/brona/iproute2mac

[2]

https://apple.stackexchange.com/questions/107953/list-all-de...

[3]

https://nixos.org

qz2 wrote at 2020-11-05 08:10:24:

This was a massive problem for me as well. And they laughed at me using a virtual machine with Linux in it while they were pissing around with broken stuff...

znpy wrote at 2020-11-05 08:59:20:

When I was given a macbook at work I used to curse all the time at mac os' grep which is _not_ gnu grep, and lacks a lot of nice cool features...

miked85 wrote at 2020-11-05 09:02:49:

You can use brew to install gnu grep as a replacement.

williamtwild wrote at 2020-11-05 10:43:59:

Its funny how people will admit to being upset about something when they are supposed to be tech saavy and should have just googled the solution .

snoopen wrote at 2020-11-05 11:23:06:

on my work MacBook we can't just brew install things, no admin permissions except for whitelisted things

znpy wrote at 2020-11-05 20:29:12:

Thank god somebody understands that not everybody is given toy macbooks to install whatever they like with no screening and/or block list.

miked85 wrote at 2020-11-06 00:37:15:

You can install brew to any directory, including your home directory.

CamJN wrote at 2020-11-05 19:32:49:

Lucky that you can install homebrew into your home directory with no admin rights then!

rmrfstar wrote at 2020-11-05 16:27:04:

Books worth owning:

https://nostarch.com/howlinuxworks2

https://www.pearson.com/us/higher-education/program/Nemeth-U...

robertbalent wrote at 2020-11-05 11:08:32:

What is the 'open' command? Is it alias for the 'xdg-open'?

Edit: Just noticed they are using MacOS. That makes it clear.

saagarjha wrote at 2020-11-05 11:25:55:

Kind of a poor title, tbh.

afarviral wrote at 2020-11-05 15:53:05:

Having read a few of the commands, I suddenly wish many of the man pages and help (not all) of common GNU/Linux commands could be re-written in the plainest and simplest of language, like this, or re-ordered with a simplistic explanation at the beginning and more detailed further down the file. Most commands on GNU/Linux require no background knowledge, or knowledge of the more powerful applications of the command and their man pages tend to just get in your way, even though they are clear and precise; by necessity they are difficult to read (since their goal is usually completeness, rather than accessibility).

hansvs wrote at 2020-11-05 12:34:56:

Um, so someone just copied in content from manpages?

willis936 wrote at 2020-11-05 11:52:11:

This is really handy. Is there a similar document on the UNIX ideology/file structure?

red_admiral wrote at 2020-11-05 12:00:20:

The file structure is standardised, the document you want for all the details is called the FHS (Filesystem Hierarchy Standard), though for a blog article you can also look at

https://www.howtogeek.com/117435/htg-explains-the-linux-dire...

for example.

For UNIX ideology (more commonly known as UNIX philosophy) you could do worse than

http://www.catb.org/~esr/writings/taoup/html/index.html

- especially chapter 1 for starters.

bellweather49 wrote at 2020-11-05 14:59:56:

Something I learned the other day is that on Linux you can type `man hier` in a terminal to get a description of the filesystem hierarchy

teddyh wrote at 2020-11-05 13:42:26:

https://manpages.debian.org/stable/manpages/hier.7.en.html

See also the FHS:

https://www.pathname.com/fhs/

dclaw wrote at 2020-11-05 18:37:57:

Surprising exclusion: the mount command

29athrowaway wrote at 2020-11-05 08:06:28:

pushd and popd. Thank me later.

LeonM wrote at 2020-11-05 11:46:28:

Weird, my Ubuntu 20 install does not have man pages on pushd and popd. Are these commands be specific to bash?

Anyway, since we are on the topic of directory navigation, I'd like to introduce 'cd -' (toggle to previous dir). Thank me later :-)

c2xlZXB5Cg wrote at 2020-11-05 14:25:34:

https://www.youtube.com/watch?v=BJ0uHhBkzOQ

First example:

    type -a <something>

to discover what <something> is (or if it exists on your system)

Fnoord wrote at 2020-11-05 12:46:57:

They are shell-specific, yes. Fish also has it built-in.

Try _man -a {pushd,popd}_ you can also use the _man -k_ flag to find manpages, and see _man man_ (or _man --help_) for more flags.

rgrau wrote at 2020-11-05 13:05:08:

zsh also has them.

Another neat way of wrapping code in pushd/popd is to use a subshell.

    (cd $dir
       do-stuff
    )

Oilshell (

https://www.oilshell.org/

) has support for code blocks so you can:

    cd /tmp {
      do-stuff
    }

roryrjb wrote at 2020-11-05 12:41:39:

They are bash built-ins. They are documented in bash's man page.

asicsp wrote at 2020-11-05 13:05:38:

can also use `help pushd` to get manual only for that command ('help' is like 'man' for built-ins)

LeonM wrote at 2020-11-05 16:24:34:

This is what I needed. None of the man pages showed information on the bash functions. 'help' did the job.

Ironically, 'man help' yields no results.

joombaga wrote at 2020-11-05 16:54:34:

That's because `help` is also builtin. It's listed under "SHELL BUILTIN COMMANDS" in `man bash 1` (or use the non-obvious `help help`)

yipbub wrote at 2020-11-05 13:29:17:

Get docs for shell builtins with help. Eg: `help pushd`

sceadu wrote at 2020-11-05 16:53:56:

Also 'setopt autopushd' (and other related options) for zsh