I love using the terminal. This video highlights some of the commands that I often use when I'm installing a new Linux distro or checking out a new distro release.
Your support is very much appreciated. Thanks, guys!
so I love spending time at the terminal
I often tend to do things at the command
line more than using gooey tools because
graphical tools well they can be useful
sometimes a lot of times I just find it
a lot quicker and easier to do things at
the command line inside a terminal and
one of the things you guys have probably
noticed is when I do any kind of drro
reviews Dro first looks anytime I drro
hop on physical equipment even forget
the stuff I do on camera the stuff I do
off camera there's certain commands that
I find very useful when I'm first
checking out a brand new Dro or a brand
new release of a drro so I wanted to
cover some of that on camera today so
let me switch over to my desktop and I'm
going to go ahead and open a terminal
and let me Zoom way in you guys see me
run a lot of the same commands on video
when I'm checking out new Dro releases
I'm going to share you know some of the
common commands that you often see me
run the most obvious one you one of the
things I immediately want to know about
a Linux syro especially if uh I didn't
read it in the release notes I usually
want to know what kernel it's running I
want to know the kernel version I want
to know if it's a upto-date kernel I
also just want to know if it's the
standard generic kernel which in this
case I'm on the the regular kernel or if
it's a LTS kernel or maybe a Zen kernel
whatever kernel you know I want to know
what the kernel version is and that way
if it's for example I prefer to could be
a LTS kernel user or a Zen kernel user
you know in this case if it was using
the generic kernel I know to go install
the kernel I want to use another cool
command you can run especially when
you're trying out new dros maybe you're
not sure what the drro version number is
what the code name is you can actually
do this command here the
LSB relase command give it the dash a
flag and that will actually give you
some information about what you're
currently running as far as your l
distribution you can see in this case
I'm running Arco Linux the release is
just rolling it's a rolling release
there's no release versions but if you
had a uh static release drro typically
you get the version number you'd also
get whatever code name is appropriate
for that version number as well on my
drro first look videos typically I want
to know how many programs are installed
on the dro that gives me an idea whether
the drro is a more minimal drro it has a
very few packages installed or maybe
it's a little bit more heavy or bloated
because it has a lot of packages
installed and there's various commands
you can run to actually check the
package count on an arch based
distribution you would run Pacman D
capital Q lowercase q and if I do that
that gives me a list of all the packages
that are installed on my Arch based
system line by line and anytime you get
a package list of the packages installed
line by line all you need to do is then
pipe it into the WC command give it DHL
for the flag so WC is the word count
program it gives you a word count by
default but if you give it the- l flag
it gives you the line count and in this
case the number of lines in the output
of this Pac-Man dqq command will tell me
the number of packages that are
installed via Pac-Man and you can see on
my system I have
1,979 packages installed these are
native packages installed through the
Pac-Man package manager now of course
this only works on Arch based systems
that use the Pacman package manager but
most of the big Linux package managers
have a way to list the number of
packages installed or the packages
installed in a line by line list so on
Debian and auntu based distributions of
course they use the APT package manager
this command here appt space list
space-- installed will give you a list
line by line of all the packages
installed and once again you would just
pipe that into wc- L if you're on a
fedora based distrib any RPM
distribution that uses dnf you could do
dnf list installed so no dash dash in
this case just dnf list installed and
then pipe that into wc- L they all give
you the same kind of output that you saw
from my pcman command here one of the
most useful commands and one of the ones
I use all the time on my videos when I'm
checking out a new distribution is the
where is command sometimes I just want
to know if a certain program is
installed Because unless it was
somewhere in the release notes I may not
know a certain program is installed or
not on this particular Linux
distribution now these days pipe wire is
often installed on most distributions
but there for a while when was there was
some uncertainty whether a distro might
be defaulting to pipewire as its audio
server or not you know I could do a
simple where is pipe wire and if pipe
wire is installed what the where is
command does it gives you the location
to the binary it also gives you a
location to any configuration files such
as you know Etsy and user share gives
you the location to the man page as well
but if the binary is present so if user
bin name of program is present then that
program is installed so that lets me
know pipewire is installed and is the
audio server on this system if it wasn't
installed I wouldn't get any output here
some of the common things that I will
often wear is on a new Linux
distribution not just on my videos but
when I install them on physical Hardware
if I'm not sure for example do they
install flat pack out of the box where
is flat pack user bin flat pack is here
so flat pack is installed on this system
sometimes I will also check if Snaps are
available especially if it's a auntu
based distribution so I'll do a where is
snapd you can see that snapd I got user
lib snapd and user share snapd here so
is snaps actually available on my system
if I do a snap list uh nothing happens
so Snaps are actually not here there's
some leftover information some libraries
here but the snapd binary is not here of
course I could actually do a search with
the Pacman QQ command remember it lists
all the packages installed well then I
could search for the package I could
grip for snapd snapd is here but those
are where is commands I will often use
where is flat pack where is snapd uh and
then I will do a flat pack list to see
if flat packs are installed out of the
box you know and it will tell me exactly
which ones are here flat pack list you
can see on my system there's a few flat
packs installed there's also a few snaps
installed on my system as well but you
can see the snap list command was not
working for me probably just I I updated
the system probably haven't rebooted I
may need to actually reboot this machine
soon some other things I will sometimes
do sometimes I don't know if it's using
uh whand or X11 especially if it's a A
system that has both xorg and Wayland
support well a easy way to find this is
do a echo and then dollar sign
xdg session type all caps so xdg session
type that's an environment variable and
what this does is if you Echo that
whatever it prints out it's going to
print out X1 or whand and that will tell
you whether your desktop environment or
window manager is currently using X11 or
whand for example these days plasma KD
plasma most dros do default to using
Wayland but some don't some actually
still use X11 out of the box I guess for
better support so sometimes I'll just
Echo that Command right that that
environment variable just to see what
they're defaulting to for their plasma
session for example also sometimes I
want to know what the default user shell
on the system is some dros most dros
will default to bash but a lot of dros
install more exotic shells like zsh or
fish or whatever you know so I want to
know what their default user shell is so
I will Echo shell all caps and in my
case you can see my user shell is his by
default is SLB slf fish now there's a
few different ways you could actually
get this shell information uh a easy way
is to just cat the/ etcp passwd file and
then that gives you a list of all the
users on the system that's what this
file contains it's a list of all the
users on the system for example the root
user the bin user the Damon user the
mail user yada yada yada but anyway go
through the list and find your username
for example my username of course is DT
typically your default uh home user his
ID will be 1,000 and then you get the
location to his home directory slome DT
in my case and his default Shi /b/ fish
again in my case and if you didn't want
to actually look for your username in
that you could just grab grip that
information I could grip for example DT
and to grip out that one line for that
specific user that I was looking for now
there's a lot of environment variables
on your system it's not just shell it's
not just xdg session type there's a lot
of these things that you could Echo out
to get their value and if you're unsure
about all the environment variables
there's a command you could do a print
EnV print environment and you can see
these are the environment variables on
my system here that have actually been
set to something for example the browser
environment variable defaults to Firefox
even though I use Brave as my main
browser the default I guess browser will
open as Firefox some of the other useful
environment variables editor all caps
you can see I use emac client as my
editor you also have uh LC C type LC
time you know some of this stuff as far
as your local information you typically
don't want to play with those values but
if you're doing a like a command line
installation of certain Linux dists like
Arch or Gen 2 or things like that you
know where you you have to start really
from the ground up and kind of make your
Linux distribution sometimes you may
have to set some of those values on your
own now sometimes you will do an
automatic installation of a Linux
distribution so maybe the distribution
is a BTU which has a very easy graphical
installer that you hit okay three times
and then you're done or all the arch
based distributions that use the calaris
installer again you hit okay three or
four times and your you're done in like
10 minutes but you really don't know
what the distribution did you don't know
what kind of partition scheme it used
you don't know what file system type
typically it used out of the box you can
get some of this information with the
lsdl command so list block is this
command it lists all your block devices
your drives so I can see exactly what it
did with the partitions in this case
this is my actual host machine here my
main workstation here which has 1 2 3
four five different drives
and a couple of different partitions on
some drives it doesn't give me the file
system information on that but you can
tack on dasf to the LSB command and it
will actually tell you the file system
that these partitioned drives are uh
partitioned to you can see I'm actually
defaulting to using extend four as the
file system on this particular drive
here SDA and also on my nvme drive as
well some other useful commands
especially on a uh Linux distribution
not just when you're first checking it
out but actually going forward you know
just managing your existing Linux
distribution htop is one I will use to
see you know what processes are running
to see which processes are sucking up a
lot of CPU or memory especially if
something seems a little weird on the
computer I can go find the process
that's taking up all that RAM for
example and then kill it inside htop uh
if htop is installed if htop is not
installed I would just install htop but
if you don't have htop installed you
could use the regular top command as
well you could also use the PS command
for listing your processes you could do
something like PS and then give it these
um options
aux and that gives you a list of
processes that are running as well once
you have the uh process ID for you know
a particular process you want to kill
you could kill it with you know the ID
of that process or if it's the program
name you could kill all for example I
could kill all email right now it would
kill all my emac windows as well as the
emac Damon that's running in the
background I'm actually using emac on a
different monitor right now so I'm not
going to kill all emac but I could do
that if I needed to to get rid of some
processes maybe some processes that were
a little out of control so those are a
few of the common commands I will use
when I'm taking a look at especially a
new distribution maybe something I just
hopped to or I'm taking a quick look at
a ISO on camera for video or whatever I
didn't cover a lot of commands for
actually in installing Linux like
through the command line for example if
you needed to manually partition your
own drives most Linux distributions have
installers that will partition the disc
for you but if you needed to do it
manually you would use either the F dis
program or maybe the CF disk program now
I have actually done videos about both
of these programs in the past go check
those videos because they're a little
bit more detailed for me to cover right
here they deserve their own videos and
again I've done videos on F disc and CF
disc in the past and beyond that you
know things like you know the tro
command and you know setting local and
time zone information and things like
that that's a little bit more deep most
of those commands I shouldn't really
have to cover on a video like this those
are for people trying to install
distributions like Arch Linux or Gen 2
anything that requires a command line
installation and typically those kinds
of distributions come with a Wiki they
come with a very easy to follow and easy
to read installation guide and they give
you line by line the commands to enter
at the terminal so you know a lot of
that stuff you know I for new users may
seem difficult but I promise you it's
not these commands once you get used to
them they're actually rather easy to
remember and to reuse over and over
again and it gets to the point where you
may be like me and you start feeling
more comfortable at the terminal than
trying to go and get that information
from whatever graphical program may or
may not be on your system that could
also give you that same information
now before I go I need to thank a few
special people I need to thank the
producers of this episode and of course
I'm talking about Matt Steve armor
Dragon cap caveman dof deist George Lee
methos Arion Paul P AR VOR reality for
Less red profit Roland waru and abtu and
Willie these guys they are my highest
tiered patrons over on patreon without
these guys this quick list of various
terminal commands I find useful
especially when I'm drro hopping this
video wouldn't have been possible the
video also would not have been possible
without each and every one of these fine
ladies and gentlemen all these names
you're seeing on the screen these are
all my supporters over on patreon
because I don't have any corporate
sponsors I'm sponsored by you guys the
community if you like my work want to
see more videos about Linux and free and
open source software subscribe to Dro
tube over on patreon peace guys