All necessary basic commands for general use

Hello, I am very new in the community, as I had just downloaded and installed(processing) EndeavourOS on my desktop which was running Windows 10 previously.

Also, I want to specify that I am not from professional coding background, rather I am Physics student. As with command line interface, I am capable of using SageMath that is necessary for my studies.

My question is not about problem but it is intended towards learning the usage of the OS.
So,
what are the basic commands that are necessary for general use that will be sufficient enough for my regular use ?
Later I will increase the level of learning in order get more oriented
.

1 Like

Some terminal commands that are worth knowing.

All of the basic commands for which much information is available elsewhere:
ls, mv, cp, cd, rm, rmdir, mkdir

Commands you should learn to use that have entire guides dedicate to their usage:
find, grep, less, ps, chown, chmod

Show a list of your disks and partitions
lsblk

Show all your mounted partitions, how much space is used and how much is free:
df -h

Create symbolic link:
ln -s <source> <target>

Shutdown the system:
systemctl poweroff

Reboot:
systemctl reboot

List all the potential systemd unit files:(useful when you want to enable one but you can’t remember the exact name)
systemctl list-unit-files

Start/stop/enable/disable a service:
systemctl start|stop|enable|disable <service>

Get information about a command:
which <command>

Get help on the usage of a command:
man <command>

Dump the contents of a file to the screen:
cat <filename>

Run a command as root or another user:
sudo <command>

Of course, you should also know about pacman, the package manager:
https://wiki.archlinux.org/title/Pacman/Rosetta

15 Likes

Hi welcome to the forum, I think these articles will give you a good start:

10 Likes

Once you have the basic linux commands down, I’d encourage you to spend as much time as you can reading the EndeavourOS Wiki and these forums. Reading along on threads others post with their problems is a great way to learn how to be self-sufficient. You’ll learn which forum members have "been there and done that - like dalto) and paying special attention to responses from those people will help you develop a good troubleshooting mindset for when things do go wrong.

1 Like

I generally use sudo shutdown now, does the systemctl make sure that running processes shutdown in a less radical way?

Is there a command to logout? Never had time to figure it out.

1 Like

shutdown is a legacy command provided by the systemd-sysvcompat package. If you look at it, it is just a symbolic link to systemctl

1 Like

I found this particularly helpful, it also explains the different terms on different distros

https://wiki.archlinux.org/title/Pacman/Rosetta

3 Likes

What’s the difference between -R and -Rs and -Rns?

The n in -Rns does exactly one thing. It blocks the creation of .pacsave files for files in the backup array that have been modified by the user. It can be combined with any of the other options although I, personally, find it somewhat pointless. This is because most packages don’t even have files in the backup array and for the few that do having a copy of that config doesn’t seem terrible.

-R tries to remove the packages you specify and only those packages. If anything depends on them, it fails.

-Rs tries to remove the packages you specify and any needed dependencies of those packages. As with -R, if anything depends on them, it fails.

3 Likes

Thank You sir.
Now I will try to work around with these commands in order learn about them.

2 Likes

Yes I will,
If I will have adequate time after my study of Physics.

1 Like

Welcome to the forum @SearingSunrazeSmash :partying_face::tada::balloon:

1 Like

In addition to the commands listed above, here is a tutorial on navigating the file system, and introduces the difference between Relative file names and Absolute file names.

Pudge

4 Likes

Website: https://linuxcommandlibrary.com/

F-Droid link: https://www.f-droid.org/packages/com.inspiredandroid.linuxcommandbibliotheca/

2 Likes

It depends on the DE you are using:

Other than that (again) Linux “knows” various additional ways:
https://www.cyberciti.biz/tips/howto-linux-kill-and-logout-users.html

1 Like

Gnome (easy)

gnome-session-quit

KDE (always wants to be the special one :laughing:)

qdbus org.kde.ksmserver /KSMServer logout 1 0 3

OT: anyone having that code block icon disappear on top of editing dialog in the forum?

7 months later …
7
– closing –
feel free to open a new thread to this