Most common Linux Commands

Recently I have been running into terminal difficulties in not speaking terminals’ language so well after a lifetime on windows.

The commands that you really need like:
sudo apt get-install…
and so on I really need to memorize but I don’t know what the most important ones need to be. For example when I want to uninstall a program my psychology has me go to the app store and click uninstall, but there are these little files left behind that are needed to make the program work that are not uninstalled along with the program, I know there is a command to get rid of those too. Also sometimes the program doesn’t completely uninstall and you are left with store codes at the top of the screen like : unable to uninstall gnome sudoku and so on.

I have been reading the ‘man bash’ that someone told me to try in the forums but first I was hoping for a list of the main ones that I could put on a paper to memorize.

1 Like

Update and upgrade:

sudo apt update && sudo apt upgrade

Autoremove:

sudo apt autoremove

Purge:

sudo apt purge $PACKAGE_NAME
2 Likes

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