Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Command Description

Directory List: Lists all files and directory ls -l

Example
ls -al or ls -l

Format

Check connectivity: Test if a system is reachable, i.e. can be connected.

ping 192.168.0.1

ping <IP Address or Name (with domain) of computer to check>

Connect or Login into a remote computer

telnet 192.168.0.1 telnet abhikalak.com

telnet <IP Address or Name (with domain) of computer to login>

Check if POP3 mail server is Up & running

telnet mail.mydomain.com 110 telnet mail.abhikalak.com 110

telnet <IP Address or Name (with domain) of computer to login> <Port for POP3 server>

Check if SMTP mail server is Up & running

telnet mail.mydomain.com 25 telnet mail.abhikalak.com 25

telnet <IP Address or Name (with domain) of computer to login> <Port for SMTP server>

Create a local user on Linux system

useradd -g users -p mypassword myusername useradd -g users -p abc123 arun

useradd -g <GroupName or GroupId> -p <Password> <UserName to create>

Remove a local user and his/her home directory (including all files)

usrdel -r myusername usrdel -r arun

usrdel -r <UserName to delete>

Become a SuperUser or any other user and change environment variables & home directory according to that user.

su - root

su - <root or any other user>

Change Password. SuperUser passwd (root) user can change passwd arun password of other users by using the second syntax.

passwd <UserName> passwd -d <UserName> (To delete password)

Shutdown the computer. Only init <level> SuperUser (root) can give poweroff these commands. shutdown

init 0 poweroff shutdown reboot (To restart machine)

To check all Ethernet cards & IPs on your Unix/Linux machine.

ifconfig

ifconfig --help for other options ifconfig <interface> for a specific interface Typically interfaces in Linux are named like eth0, eth1 for ethernet cards.

To check all Ethernet cards & IPs on your Windows machine.

ipconfig /all

ipconfig /? for other options

You might also like