Most common Linux Commands

Thanks FL, man you are full time at this.

1 Like

Got any more useful commands that I can write down?

1 Like

Those commands are all you need to address your issues listed in this topic, but here are some bonus ones:

  1. List distribution information:
lsb_release -a
  1. List current working directory:
ls
  1. Change directory:
cd $DIRECTORY_NAME
  1. Remove directory, including its contained contents recursively:
rm -r $DIRECTORY_NAME
  1. Invoke a root shell:
sudo -s
2 Likes

@FranklyFlawless it is fancy on Gnu+Lnx.

Before to tackle command you need to know that Debian it is the unique Gnu+Lnx on the Planet, others distros are just fragmentation, experimentation and antagonizers of Debian APT.

2 Likes

A lot to learn, always.

2 Likes

There are several linux terminal command “cheat sheets” available that list some chosen commands, and here’s one: Linux Commands Cheat Sheet {with Free Downloadable PDF}

3 Likes

You can download a whole ebook for free. It links from the following forum comment:

3 Likes

It is also said that a little knowledge is dangerous.

Using apt to remove or purge a package may end up doing bad things.

So I would say … before learning any potentially destructive shell commands … learn how to use Jumpdrive to image the eMMC drive (backup and restore).

3 Likes

So first I need to learn jumpdrive then learn commands. eMMC. Jumpdrive.

1 Like

You may want to check the FAQ & tips and tricks from the community wiki: Home · Wiki · Librem5 / Librem 5 Community Wiki · GitLab

2 Likes

The eMMC drive is the main drive in the Librem 5. If you have not inserted a µSD card in your phone then the eMMC drive is the only drive in the Librem 5. The eMMC drive is the drive from which the Librem 5 ordinarily boots.

… is software that you download to your Linux host computer (e.g. desktop or laptop) so that you can backup and restore the Librem 5 in a safe and comprehensive way.

2 Likes

is that a
sudo apt get-install jumpdrive thing?

or is it a plug into a linux computer thing? I am not sure if in the context of your last sentence you meant the phone as a computer.

1 Like

This.

The emphasis was on host and e.g. desktop or laptop. So you need to get Jumpdrive sorted out on your host computer before bothering to plug the Librem 5 into the host computer.

And, no, Jumpdrive is not an apt install - it’s just a hack download.


Aside: note that apt confusingly comes in two flavours, with incompatible syntax.

sudo apt install zzzsomethingzzz
sudo apt-get install zzzsomethingzzz

but you have managed to quote a hybrid between the two.

Personally I will always try to use the former (apt), not the latter (apt-get).

2 Likes

What is the distinction between apt and apt-get? Is the apt command when something is already on the drive with an assigned index file? Maybe the…apt-get install is some kind of fetching thing then install?

Hey still progress, I have figured out the quote function.

1 Like

And the librem computer works off of the same debian 10 platform that the phone functions on?
Same terminal commands and all?

2 Likes

Yes, all Librem is using Debian and same command like.

2 Likes

Apt is more user friendly version with progressbar etc. From: Difference Between apt and apt-get Commands [Explained]

The apt command is a smaller section of the apt-get and apt-cache options. The apt command gives the end user just enough tools to install, remove, search and update APT packages. The apt-get command has a lot more options that are useful for writing low-level scripts and tools.

Even more in-depth article: https://www.howtogeek.com/791055/apt-vs-apt-get-whats-the-difference-on-linux/

4 Likes

There are separate threads (and some in the wiki) about using jumpdrive for various tasks. In short, its a way to connect L5 to a desktop/laptop (“normal” computer vs. the phone-computer-device) via usb cable, to make the L5 filesystem open like any other USB memory/disc. There is a procedure to make this happen, physical and on the host computer, but on the L5 no software is needed to be installed for it.

2 Likes

Other commands:

  1. apt-cache search (sudo not required)

It is useful to get the exact package names to be used for an “apt install”. I use “apt-cache search”. For example:

apt-cache search numpy | grep python3

Of course these days one can also do a search with apt (apt has the best of apt-get, apt-cache, …), but I find it to not be as reliably grep-able.

  1. dpkg --get-selections and “sudo dpkg --set-selections”

The first gives a list of installed/deinstalled pacakges. The second will set dpkg selections so that if you do a “sudo apt update” and “sudo apt upgrade” it will install all the packages. I find this useful if I’ve done a lot of installs and I want to wipe and reinstall with the same package selections.

dpkg --get-selections > package_list.txt

And after a system reinstall one can duplicate those installed packages by copying that package_list.txt file and setting those selections:

sudo dpkg --set-selections < package_list.txt
sudo apt update
sudo apt upgrade

2 Likes

sudo apt autoremove got rid of that annoying gnome message in the store. Thanks for that.

1 Like