Top 15 Linux Commands Flashcards
What is Linux command cd?
Change directory allows you to navigate to another directory.
Example: cd downloads
Example: cd /etc/
Example: cd .. (Directory up!)
What is Linux command man?
Shows the users the manual of the command. In case you need to get more information about the command.
Example: man cp
Note: to close the manual simply press “Q”
What is Linux command ls?
ls lists the files/directories within a directory
Example: ls
What is Linux command cp?
The command command is available for us to copy things. Useful for duplicating files.
Example: cp file file2
What is Linux command mv?
mv command is used for move operations, allows users to move a file/directory to a specified location.
Example: mv /home/bas/Desktop/bla /home/bas/desktop/fiets
What is Linux command mkdir
This command is used to make directories, not files.
Example: mkdir testdirectory
What is Linux command rmdir?
rmdir is used to remove directories.
Example: rmdir fiets
What is Linux command touch?
Touch command is used to make files.
Example: touch Vogel
What is Linux command rm?
This command is used to delete files instead of directories.
Example: rm Vogel
What is Linux command tar?
Tar is used to archive files, a way to pack a bunch of files into a single file.
Example: tar -Cvf test.tar test (creating a tar file from directory or file test)
What is Linux command pwd?
Pwd stands for path working directory, shows you where you are in the system.
What is Linux command ifconfig?
Ifconfig is a command showing you information about the ethernet adapters on your system. It contains very useful information like gateway, ip, and packet statistics.
Example: ifconfig
Note: to gain information about the wireless adapters on your system type iwconfig.
What is Linux command locate?
Locate is an extremely fast searching command. It shows the directories or files each on a new line.
Example: locate syslog
Example: locate syslog | more (piping structure used to invert the data from locate to the more command)
Note: some keywords returns enormous amounts of hits. Use MORE to (see example) clear things up a bit.
What is Linux command ping?
Ping is used as a network diagnostic command by professionals. Ping offers info about the network we are on and if the other system responds to us. In cases of troubleshooting network related problems, ping can do a great job to determine the domain of the problem.
Example: ping www.google.com
Command returns the interval and % of loss during the test.
What is Linux command chmod?
Chmod command comes from “Change Mode” back to the unix times. It’s a great command to restrict access to directories or files. But before I show you an example on how to use it, some theory.
Chmod is quiet an advanced command to use. So therefore you really need to understand how it works. chmod works with so called permission bits. These bits can be set to a certain level of restrictions.
7 full 6 read and write 5 read and execute 4 read only 3 write and execute 2 write only 1 execute only 0 none
Source: http://en.wimipedia.org/wiki/Chmod