4 ms·
The Linux Commands HandBook
- roryrjb 6y agoYeah 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.
- qz2 6y agoThis 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 6y agoWhen 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 6y agoYou can use brew to install gnu grep as a replacement.
- williamtwild 6y agoIts 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 6y agoon my work MacBook we can't just brew install things, no admin permissions except for whitelisted things
- CamJN 6y agoLucky that you can install homebrew into your home directory with no admin rights then!
- znpy 6y agoThank god somebody understands that not everybody is given toy macbooks to install whatever they like with no screening and/or block list.
- deleted 6y ago[deleted]
- miked85 6y agoYou can install brew to any directory, including your home directory.
- Fnoord 6y agoYour 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 https://github.com/brona/iproute2mac [2] https://apple.stackexchange.com/questions/107953/list-all-devices-connected-lsblk-for-mac-os-x https://apple.stackexchange.com/questions/107953/list-all-de... [3] https://nixos.org https://nixos.org
- 29athrowaway 6y agopushd and popd. Thank me later.
- LeonM 6y agoWeird, 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 6y agohttps://www.youtube.com/watch?v=BJ0uHhBkzOQ https://www.youtube.com/watch?v=BJ0uHhBkzOQ First example: type -a <something> to discover what <something> is (or if it exists on your system)
- roryrjb 6y agoThey are bash built-ins. They are documented in bash's man page.
- asicsp 6y agocan also use `help pushd` to get manual only for that command ('help' is like 'man' for built-ins)
- LeonM 6y agoThis 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 6y agoThat's because `help` is also builtin. It's listed under "SHELL BUILTIN COMMANDS" in `man bash 1` (or use the non-obvious `help help`)
- 6y ago
- robertbalent 6y agoWhat is the 'open' command? Is it alias for the 'xdg-open'? Edit: Just noticed they are using MacOS. That makes it clear.
- saagarjha 6y agoKind of a poor title, tbh.
- willis936 6y agoThis is really handy. Is there a similar document on the UNIX ideology/file structure?
- red_admiral 6y agoThe 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-directory-structure-explained/ 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 http://www.catb.org/~esr/writings/taoup/html/index.html - especially chapter 1 for starters.
- teddyh 6y agohttps://manpages.debian.org/stable/manpages/hier.7.en.html https://manpages.debian.org/stable/manpages/hier.7.en.html See also the FHS: https://www.pathname.com/fhs/ https://www.pathname.com/fhs/
- bellweather49 6y agoSomething 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
- red_admiral 6y agoSeveral 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-commands-handbook/linux-commands-handbook.pdf 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 6y ago> Linux is an operating system, like macOS or Windows. Nup, it's just a kernel.
- emilecantin 6y agoI'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 https://www.lurkmore.com/view/GNU/Linux_interjection)
- hansvs 6y agoUm, so someone just copied in content from manpages?
- afarviral 6y agoHaving 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).
- rmrfstar 6y agoBooks worth owning: https://nostarch.com/howlinuxworks2 https://nostarch.com/howlinuxworks2 https://www.pearson.com/us/higher-education/program/Nemeth-UNIX-and-Linux-System-Administration-Handbook-5th-Edition/PGM143215.html https://www.pearson.com/us/higher-education/program/Nemeth-U...
- dclaw 6y agoSurprising exclusion: the mount command