top of page

passwd — Change your password (https://www.tutorialworks.com/linux-commands/#passwd)

​

# Change your password (you'll be prompted for your current password first)

$ passwd

cd — Change the current directory (folder) (https://www.tutorialworks.com/linux-commands/#cd)

​

# Change directory to `mydocs`

$ cd mydocs # Change to the parent directory (the directory above the current one)

$ cd .. # Change to your user home directory (note it's just `cd` without any arguments!)

$ cd

cd — Change the current directory (folder) (https://www.tutorialworks.com/linux-commands/#cd)

​

# Change directory to `mydocs`

$ cd mydocs # Change to the parent directory (the directory above the current one)

$ cd .. # Change to your user home directory (note it's just `cd` without any arguments!)

$ cd

ls — List files in a directory(folder) (https://www.tutorialworks.com/linux-commands/#cd)

​

# List files in the current directory (to show your current directory, type [pwd](#pwd))
$ ls

# List files (including hidden files) and also show their permissions and who owns them.
$ ls -al

# List files (including hidden), ordering by most recent at the bottom.
$ ls -alrt

cp — Copy files and directories (https://www.tutorialworks.com/linux-commands/#pwd)

​

# Copy the contents of the file `money.txt` into a file `money.bak`
$ cp money.txt money.bak

# Copy the directory `songs` (and all of its contents) into `songs2`
$ cp -rp songs songs2

rm — Delete files and directories (https://www.tutorialworks.com/linux-commands/#pwd)

​

# Delete the file `myfile.txt`
$ rm myfile.txt

# Delete the directory `songs` and all files in it, without prompting! (warning, use this with caution!)
$ rm -rf songs

Linux Networking Commands 

​

 

  • From a user login on a Linux system (a $ prompt), execute each of the following commands. When you attempt a command and any needed information (parameters) is missing, the help information for that command will display. From that you can choose the options (flags) you wish to use.

 

  • Execute each of the following commands and describe the results it returns and displays. 

 

  • Arp: The Address Resolution Protocol of the system.  The command displays the neighboring cache.

​

  • curl or wget: Curl is used to check the communication using specified protocol while wget is a command for downloading files

 

  • dig:  Domain Information Groper is a command for doing lookup.  You can query for records, server names, host addresses and mail exchanges from the DNS

 

  • host:  A domain name system lookup command.  This is used to find the IP addresses of domain names.  Can also do reverse lookups.

 

  • Hostname:  Name of the computer.  The hostname command displays or sets the systems hostname or the current host.

 

  • Ifconfig:  A major Linux command.   It is used to assign IP address and add, delete and control as we as configuring the network interface.

 

  • Ifplugstatus:  A utility that runs in the background.  It is used to check whether a cable is plugged into the interface as well as detecting the status of a local Ethernet connection. 

 

  • Iftop: A simple command that displays the bandwith.  Too exit you press Q.  To view the source and destination ports you press SHIFT+S and SHIFT+D.

 

  • Ip:  Internet Protocol command that configures the network interface by assigning an address

 

  • Iwconfig: Similar to the ifconfig command as it works with the kernel interface however, it’s specialty working with wireless interfaces.  It is used to set the parameters that are explicit to the wireless frequency. 

 

  • Mtr: A network diagnostic tool that provides both ping and traceroute functionality.  When using, you can exit the screen by doing a control+c

 

  • netstat:  A command giving lots of information about the network.  Can display connections, tables, statistics, etc.

 

  • nslookup:  Command used for getting information from the DNS server.  Essentially, it performs lookups such as the IP address of a certain computer.

​

  • Ping:  One of the more popular commands.  Used for diagnosing connectivity, testing and troubleshooting issues.  Does this by sending an Internet Control Message Protocol request to an explicit IP on the network and listens for a reply.   Press the Ctrl+Alt+T as you double-click on the terminal app icon, then type in “Ping”. Then enter.

 

  • Route: A command used showing or changing IP routing tables.  Used to deploy static routes to implicit hosts or networks through an Interface. # route is the command.

 

  • ss:  Another command that monitors network connections.  Displays TCP, listening ports and other information than most utilities.  Also shows socket information. # ss is the command.

 

  • Tcpdump:  One of the most powerful Linux tools.  This command is considered a packet sniffer or analyzer tool.   Inspects traffic coming and going from a system.  Can also do dumping.  tcpdump is the command.

 

  • Tracepath:  Command that traces a path to a specific computer.  Uses UDP or random port.  Similar to Traceroute However, tracepath does not require root privileges.

 

  • Traceroute:  Traces a route by sending three packets to a hop.  The time determine to reach the destination is figured out by the time each packet gets to the hop.  Identifies the path by using ICMP messages.  This command is good for analyzing network connectivity in a local setting.  Gives information about how packets are sent between your systems.

 

  • Whois:  Used as a query and respone command for finding out domain information as well as contact info and nameservers.   Basically used as a querying tool for databases store system information.

bottom of page