Find A Program’s PID (Process Identification)

Today’s article is going to tell you how to find a program’s PID. PID stands for “Process Identification” and every running process has one. It’s in numeric format and knowing the PID makes it easy to manage processes. So, today we’ll be covering that. It’s a quick and easy article, useful perhaps for a future article to reference or as just a quick note as a reminder.

We’ll mostly be using a program called ‘pidof’ and you can figure out why it is named what it is pretty easily. It defines itself as:

pidof — find the process ID of a running program.

As we will just be covering general usage, we really won’t have to be all that verbose. There’s a man page for pidof, which you can (and possibly should) reference. The usage we’ll be covering is just that of a lone admin on their bog-standard home computers. If you have anything other than that, you might want to read the man page.

So, with that in mind, let’s learn how to…

Find A Program’s PID:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With that terminal now open, you can find a program’s PID with the following command:

That should spit it out. It looks like this:

output from pidoff
That’s a nice and easy one!

On the other hand, it can look like this:

pidof chrome browser with a whole lot of tabs open
That’d be the PIDs of Google Chrome when you have a ton of crap open.

Now, you can do a lot with that information – things best suited for another article perhaps. Either way, you’ve learned how to find a program’s PID. It really was that easy! You’re welcome and thanks for reading!

But wait, there’s more! 

I’m not sure where I came across the gem, but it’s pretty awesome. There are some variations (I tried to find my source for this to give credit where credit is due, but it’s out there in a few places – none older than my notes on the matter) but this one is nice and easy.

Ready? Enter this into your terminal:

That should turn your cursor into a cross-hairs. Go ahead and click on an application and then check the output in the terminal. It should, among a few other tidbits of information, help you find a program’s PID with just a simple point and click. (Useful mostly on applications that only have one or two instance running.)

By the way, if you’re looking to find a script’s PID that you have running, you just need to add the -x flag. It’d look like this:

Which is pretty much all a basic home-user is ever going to need to know. Again, check the man page if it’s more complicated than that.

Closure:

Congratulations! You now know how to find a program’s PID. From there you can do stuff like kill it! I’d expect an article in the future that reaches back to this one, using it as a reference, that makes it all come together a little better. Until then…

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Smash a button!
[Total: 2 Average: 4.5]

Has Your Email/Phone (Personal Information) Been Involved In A Data Breach?

Today’s article isn’t all that Linux specific, but pertains to your personal information and whether or not it has been leaked or hacked. This is good information to know. While there’s not much that you can do after the fact, there are steps you can take when the inevitable happens and those steps will vary depending on the severity of the hack and how much information the bad folks got away with.

Basically, when you visit sites you leave at least some information behind. Depending on the site, you may leave more information behind than other sites. For instance, you may leave behind your email address when you signed up for their newsletter. This is relatively benign (insert plug for the Linux-Tips newsletter), but more concerning when you add more information to it – such as your password, phone number, username, answers to security questions, etc…

Sometimes, those sites aren’t all that well defended and people manage to find exploits that give them access to this data. These are known as data breaches. Your data is then, more often than not, put up somewhere online for sale or even for free. The usual goal is to sell this data, as profit is the ultimate motive these days.

There’s quite a bit that bad actors can do with this hacked and leaked data. This is especially true if you do things like re-use passwords. By the way, that’s something you should never do. Don’t use a password or a ‘password system’. Generate random passwords for every use. 

Enter “have i been pwned?”

This have i been pwned? site has been around for a long time. You can visit the site by clicking the following:

have i been pwned?

Go there and enter your email address or phone number. It will then let you know if your data has been exposed in a data breach. The site’s name is a play on the word ‘pwned’ – which means similar to ‘owned’ or, in this case, your personal information been exposed by way of a data breach.

If your personal information has been included in a data breach that was made public, it’ll be listed in the results. For example, I have one email address that was involved in a very dark time for Linux Mint. See this:

my data has been breached
My personal information was compromised in this attack. Also, yes that happened. It’s very much real.

You can be reasonably comfortable putting your email into that site. They have a long, long history of good behavior and, at the end of the day, you’d just lose your email address. So, feel free to drop your email addresses into the site.

NOTE: I take your personal information seriously. If I ask for it, I secure it. I only ask for as much information as required for the role. Signing up for the newsletter doesn’t even ask for a username! Passwords are salted and hashed (not saved in plain text). There’s a layered approach to prevent compromise, including things like requiring 2FA for administrative roles.

Again, “have i been pwned?” has no motivation to do anything with your email address and their reputation is pretty solid. You can drop your email address into the search box safely.

They Lost Your Personal Information: 

So, what can you do if you found out that your personal information has been compromised? There’s not a whole lot, actually. Once the data is out there, it’s out there. You can’t do anything to take it back.

What you can do is stop doing business with these people. You can change your passwords for the compromised sites. You can also check other accounts for signs of compromise. Depending on the data that was lost, you can lock your credit or use a credit monitoring service.

When (not ‘if’) you find your email and personal information in these lists, it can be a little jarring. It’s not entirely unlike finding out that your house has been broken into. But, you can relax. It’s not the end of the world or anything of that nature.

In many cases, passwords aren’t stored in plain text. They’re hashed and salted before they’re stored. The password you typed in is just checked against the hashed values and, so long as you match, you’re let into your account. That’s a great thing, a great start even, but rainbow table attacks still exist to attack hashed passwords.

If there are extra security steps you can take, take them! If you can enable 2FA (2 Factor Authentication), they by all means do so. A login that requires a second factor, such as a code sent to email or to text message, is much more secure. This is more useful before a hack occurs, of course.

When you give out your personal information, ask yourself if you truly need to give the information and if you trust the company with that information. Different companies may have different trust levels for you. I trust this site with all my information, ’cause I own it. I trust sneakydownload.site enough to have my email address and nothing more. There’s a pretty broad spectrum of trust and a very personal choice to make.

Closure:

This article could easily run thousands of words, as security, privacy, and personal information are broad subjects. Be careful who you trust and be sure to check in once in a while to see if your personal information has been compromised. On Linux-Tips.us, I just avoid collecting data. I find it easier to protect your data if I don’t actually have it. However, even this small site is under attack constantly:

Linux Tips attacks
That’s a week’s worth of attacks. That’s just for a small site.

The two spam comment selections are from people/bots who made it through the first levels of defense. Even the rest of the numbers are people who made it through the basic security checks, now that I think about it in this light. Point being that a site is constantly under attack and your personal information is a commodity, so protect it well.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

 

Smash a button!
[Total: 8 Average: 4.9]

How To: Install Eclipse On Ubuntu 20.04

Today’s article will tell you how to install Eclipse on Ubuntu 20.04. Though I suppose that, technically, it was tested on Lubuntu. Still, it should work for any Ubuntu official flavor and probably any derivatives. 

Eclipse is the IDE (Integrated Development Environment) for Java. I’m pretty sure it’s number one in that role, or really close to it. It’s also useful for other programming languages, so I thought I’d check it out. It’s actually just a couple of commands to install Eclipse on Ubuntu, but it can be a little confusing, and I figured I’d document it here. 

I didn’t spend all that long using it, as I’m not really a Java dev, but I did look around and I can see why it’s popular. It’s fairly intuitive and there’s a plugin for anything you can think of. Seriously, there’s a lot of plugins – like ~1500 of them. I’m a bit under the weather, so you get what you get today.

Not being a Java developer, and mostly just being curious, I really can’t say that it’s a good IDE. But, it did look intuitive – things were where I expected to find them – and there’s a robust community surrounding it. On top of that, the list of plugins is huge and there were plugins to cover a lot. So, you might as well take a look if you’re looking for an IDE. This is programming software, so its popularity is almost certainly deserved and for good reason.

Install Eclipse On Ubuntu:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Usually, you just install stuff from the Snap Store and that’s it. Installing Eclipse is actually a little different. It’s actually written in Java and  so will need a JRE. That’s not actually included in the Snap. That right there kinda makes me wonder about how well Snaps will fill their roles into the future – as being complete packages is one of the Snap goals.

That was it. That was the ‘trick’. You can now install an up-to-date Snap version (as there have been older versions in the default repositories and PPAs). To install via Snap, you just:

Once that has run its course, you can test the Eclipse IDE to see if it’s what you need in your programming tool-chain. It wasn’t all that hard and you should now have the most recent Eclipse installed. The Snap should stay updated regularly, much more regularly than the old repository way. So, there’s that. Which is nice.

Closure:

And there you have it. This article is nice and easy, and short! It’s also one more said and done, thankfully. I was feeling a bit icky when I wrote this one, so it’s definitely not a great article – but it is an article!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Last Updated on March 27, 2022 by KGIII

Smash a button!
[Total: 5 Average: 5]

How To: Install PIP In Linux

Today’s article is going to teach you how to install PIP in Linux. PIP is a reverse acronym meaning ‘PIP Installs Packages” and it’s a handy tool for the installation and management of Python applications. This article should be pretty short and easy for anyone to understand. 

This article is going to be pretty basic, merely telling you how to install PIP and not a whole lot more. The reason I write this article is because it needs to be written. I should also point out that Python is a programming language, though I’d expect most visitors to know that already. But, yes, this article needed to be written.

See, I wanted to tell you about a lovely piece of software (or three), but they all need to be installed with PIP. So, rather than write out the long installation instructions for various distros and package managers each time, I figured I’d make a single article that told you how to install PIP.

That’ll save some time and effort. I can refer back to this when those articles are written. There are many Python applications that can be installed with relative ease – just like you’re installing from your regular Linux repositories. PIP’s Python applications can be installed and uninstalled in the terminal while using PIP, so it’s quite easy.

So then, let’s learn how to…

Install PIP In Linux:

Installing PIP requires a terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Once you have the terminal open, you can install the appropriate PIP. Most folks will be using Python 3, but a smattering of people will still be using Python 2. I will list the installation instructions, where applicable, with Python 2’s instructions first.

Debian/Ubuntu/derivatives:

SUSE/openSUSE/derivatives:

Fedora/derivatives:

RHEL/CentOS/derivatives:

Arch/Manjaro/derivatives:

Slackware:

Read Install PIP For Slackwaare Instructions.

The basic usage of PIP is pip install <package>, pip uninstall <package>, and pip search <package>. My readers are smart enough to understand that without further instructions. You can also learn a lot by using man pip. Now you know how to install PIP in Linux.

Closure:

And there you have it. You have an article telling you how to install PIP in Linux, enabling you to install Python packages/programs quickly and easily inside the Linux terminal. It’s also one more article in my series of articles. I’m now well within a month of when the project is allowed to end and I still have a lot of articles left in me, so I’d expect it to keep going for long into the future. Or at least until someone steps up and takes the site over for me.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Smash a button!
[Total: 2 Average: 5]

Monitor TCP/UDP In Real Time

If you’re concerned about network connections to your device, you may want to monitor TCP/UDP in real time. It’s a pretty handy way to get a handle on what connections are being made by your devices. This article could be pretty complicated, but I’ll try to make sense of it all.

By the way, if you ever want to be sure you know something, try explaining it to someone who knows nothing about it. It can be pretty humbling. Leave a comment letting me know how I did.

Anyhow, moving on…

Network connections happen on various ports. Think of them as though your computer is a country and you have various ports that let traffic in and let traffic out.

There are different kinds of traffic, just like there are different kinds of ships. You have leisure, goods, military ships, etc… You have cruise ships, tankers, cargo yachts, kayaks, aircraft carriers, etc. Traffic is often bidirectional, meaning going in and leaving on the same port. In the case of TCP and UDP, traffic is bidirectional so one port will accommodate both.

So…

What Are TCP and UDP Anyhow?

In the case of TCP, you may be familiar with the expression TCP/IP, and it stands for Transmission Control Protocol. TCP requires a server/client relationship and should only be used on certain ports. Those ports are things like FTP, SSH, SMTP, Time, TELNET, etc… So, if you know you don’t have an FTP server running, you really shouldn’t be seeing traffic on ports 20 or 21.

UDP, on the other hand, stands for “User Datagram Protocol”. Unlike UDP, there’s no client/server relationship required. It just spews traffic out as needed/ordered. UDP connections do things like check a DNS server to find the IP address for a domain name. It then waits for the server to respond. There’s less latency and it’s more useful for ‘real time’ processes. Voice and video may be sent using UDP. Again, if you’re seeing unrecognized traffic, there may be a problem.

If you want, you can get a general idea (you don’t really need to memorize this) of what belongs where, with regards of TCP/UDP traffic. Wikipedia has an excellent list of TCP/UDP port numbers.

So, with that information at hand, you can see why you might want to …

Monitor TCP/UDP In Real Time:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

Once you have your terminal open, you can use ‘netstat’ and examine this in detail. If you just want to check once,  you can run this command:

To monitor it in real time, you’ll just use the ‘watch’ command. That’d look like this:

You can use the -n flag to change the refresh interval, as it will default to every two seconds. To make it every five seconds, the command would look like this:

You can change that number, but you can go no lower than once ever 0.1 seconds. I’m not sure if there’s an upper threshold, but it might have one. 

Either way, you can monitor your TCP/IP connections in real time. It’s not really all that difficult. You may see some results that alarm you, but odds are you’re just new to checking the output. Before getting alarmed and making drastic changes to your computer, research to see if the connection is actually just normal traffic.

Closure:

And there you have it, you have another article to read. This one is about how you can monitor TCP/UDP in real time, a useful tool if you’re concerned with your network’s traffic. Malicious activities will likely require network ingress and egress, so this can help your security assessments. Strange connections don’t necessarily mean there’s a problem – but they do mean you might want to look to see what’s causing the connections.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Smash a button!
[Total: 5 Average: 4.6]
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
Zoom to top!