0% found this document useful (0 votes)
55 views5 pages

Linux Vs Ubuntu Commands

Linux and Ubuntu commands provide similar but sometimes different commands for network configuration and administration. Key commands include nmcli/ifconfig to configure networking, sudo to run commands as root, and lshw/lsblk to view hardware details like network cards. Both platforms also use commands like ip addr, route, and netstat to view network settings and check for ports in use.

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views5 pages

Linux Vs Ubuntu Commands

Linux and Ubuntu commands provide similar but sometimes different commands for network configuration and administration. Key commands include nmcli/ifconfig to configure networking, sudo to run commands as root, and lshw/lsblk to view hardware details like network cards. Both platforms also use commands like ip addr, route, and netstat to view network settings and check for ports in use.

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Linux Vs Ubuntu Commands

Linux commands

Nmcli it’s to configure network connections in linux


Ip a will give the details of configured network details.
Nmcli con show ( or ) will show the status of the network cards
nmcli dev status
Nmcli
Visudo It’s editor to edit the sudo user privileges
Useradd username To add user
To add the user to wheel to make the user as a root user

usermod -aG wheel


USERNAME

Sudo su – (or) sudo –su We can login as a root/another user

root (or ) su USERNAME

-
sudo passwd root Reset root user password
Systemctl start sshd To start the ssh service
Systemctl status sshd To know the status of ssh service
uname -a To check the server type and name

sudo lshw -c network To get the detailed view of network configuration


ls To list the directory
Pwd Print/Present working Directory
sudo ss –tulw To check the port connection status – listen state
sudo ss –tulw To check the port connection status – listen state
Ubuntu
sudo ifconfig eth0 up/down It’s to enable/disable the network card
Ip link show(optional) It will display the list of Ethernet cards
Ip a (or) ifconfig It will display the ip configuration
sudo lsof -i -P -n | grep To check ports are in use
LISTEN
sudo netstat -tulpn | grep
LISTEN
uname -a To check the server type and name

sudo lshw -c network To get the detailed view of network configuration


ls To list the directory
Pwd Print/Present working Directory
sudo ufw status Status of firewall
Sudo ufw enable/disable Enable or disable firewall
Sudo ufw allow 80 It will allow the http in the port.
Sudo ufw allow 443 It will allow the https in the port.
sudo ss –tulw To check the port connection status – listen state
sudo ss –tulw To check the port connection status – listen state
Ip addr It will give ip address of the ethernet
Route (or) route –n Routing table
Systemd-resolve –status Ethernet list with resolving status
Cd /etc/netplan Configure the Ethernet card ip addresses
Nano 50*

Sudo netplan apply

Example:

network:
version: 2 https://www.howtogeek.com/118337/stupid-geek-
renderer: networkd
ethernets: tricks-change-your-ip-address-from-the-command-
enp0s3:
dhcp4: no line-in-linux/
addresses:
[192.168.1.233/24]
gateway4: 192.168.1.1
nameservers:
addresses:

[8.8.8.8,8.8.4.4]
PVcreate https://linoxide.com/linux-how-to/lvm-
VGcreate /extend configuration-linux/
LVMcreate /extend

Lsblk – display the block list


https://www.digitalocean.com/community/tutorials

/how-to-use-lvm-to-manage-storage-devices-on-

ubuntu-16-04

https://fabianlee.org/2016/07/26/ubuntu-

extending-a-virtualized-disk-when-using-lvm/

https://www.techotopia.com/index.php/Adding_a_

New_Disk_Drive_to_an_Ubuntu_Linux_System
Remove PV from LVM learnitguide.net/2016/08/remove-lvm-physical-

volume-pv-in-linux.html
Change root user password https://www.cyberciti.biz/faq/change-root-

password-ubuntu-linux/
Change apache port number https://www.ostechnix.com/how-to-change-

apache-ftp-and-ssh-default-port-to-a-custom-port-

part-1/
Apache restart https://www.cyberciti.biz/faq/star-stop-restart-

apache2-webserver/
Finding the directory size https://www.cloudbooklet.com/find-directory-size-

in-ubuntu-debian/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy