Linux Beginner’s Guide Part 6

3 minutes read

Linux_logo_errorbits.com

Network Configuration

The ifconfig command is used to view the current network configuration for ethernet cards and iwconfig displays the network configuration for wireless cards.

ifconfig [OPTIONS]

iwconfig [OPTIONS]

linux networking ifconfig iwconfig errorbits.com

Because this is the output from a Virtual Machine the ethernet is called enp0s3, on hardware machines is eth0.

The lo (loopback) interface is a software device used by the operating system when sending network data to itself, used for testing, troubleshooting and debugging mostly.

The virbr0 is also a interface created by the Virtual Machine and connects the virtual network card with the local network card that is configured on the system on which the VM is installed, you won’t see it if you do not have a VM software installed.

The ifconfig and iwconfig can be used to make temporary changes in the network interfaces.

Processes

Running any kind of application/command/game and so on, creates something that is called process. The process runs with the privileges with the user who created it, this way the process is controlled and limited to run only under certain capabilities. The user who creates a process is the owner if it and it can not be controlled by other users with same or lower privileges. In our case, if the sysadmin user runs a process, another user with same or lower privilege level, can not control it but it can be controlled by the root user. The ps command is used to view the processes.

ps [OPTIONS]

The default output for ps command includes 4 columns and displays only the processes for the current terminal:

PID: process identifier, is a unique ID used to identify each process and to control it;

TTY: terminal name where the process is running, is used to identify a process if there are more that have same name;

TIME: total amount of processor time used by the process;

CMD: command that started the process;

To view the processes from the entire system ps -e command must be executed and ps -f displays more details for each process. The two commands above can be combined into one: ps -ef.

Updating the passwords

The passwd command is used to change the password. The users can only change their own password and the root user can change the password of any user.

passwd [OPTIONS] [USER]

If the passwd command is used without arguments, the terminal automatically starts the procedure for changing the password for current user.

If you want to see the details about the status of the password you must follow the following steps:

su root

passwd -S sysadmin

linux passwd root errorbits.com

1st column: username – sysadmin

2nd column: password statusP = usable password; L = locked password; NP = no password;

3rd column: date – when the password was last change (current password was never changed = 1969-12-30)

4th column: minimum – the minimum number of days until the user can change the password

5th column: maximum – the maximum number of days until the password will expire

6th column: warn – the number of days before the password will expire and the user will be warned

7th column: inactive – the number of days after the password will expire and the user will remain active

8th column: info – details about the password status and encryption

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

Related Posts:

Many Linux commands deal with sensitive data like system hardware, passwords or operate under exceptional circumstances. Prevents regular users from executing these commands by mistakes and helps to protect data and system integrity. By logging in as root enab...
To install Golang in Kali Linux, you can follow these steps:Open the terminal on your Kali Linux system. Download the latest stable version of Golang from the official website. You can use the wget command to download it directly from the terminal. For example...
The touch command is used to create files of any type, for example you can create test.txt, test.jpg, test.doc but only specialized software can read and create content in these file types.
Installing Packages/Applications/Software The yum (apt-get or apt in Ubuntu) command is used to install new packages and to update/upgrade the operating system, it requires administrative access, so it must be used with sudo. yum [OPTIONS] [COMMAND] apt-get [O...
grep command is a text filter that searches for the input and returns the text lines by a given pattern. In order to start the example, use the following command to get to the /Documents/ folder: cd ~/Documents
Linux Fedora, often referred to simply as Fedora, is a popular open-source Linux-based operating system that is known for its focus on innovation, community-driven development, and cutting-edge features. Fedora is a free and open-source operating system that i...