|apt-get||Command-line tool for handling packages, and may be considered|
the user’s “back-end” to other tools using the APT library.
|$ apt-get install <package_name>|
|cat||Copies each FILE (‘-’ means standard input), or standard input if|
none are given, to standard output.
|$ cat content.txt|
|cd||Takes you to a directory||$ cd /home/local/|
|chmod||Changes the access permissions of the named files.||$ chmod 755 content.txt|
|cp||copies files (or, optionally, directories). The copy is completely|
independent of the original. You can either copy one file to another,
or copy arbitrarily many files to a destination directory.
|$ cp file.txt /home/user/|
|df||Reports the amount of disk space used and available on file|
|du||Reports the amount of disk space used by the set of specified files|
and for each subdirectory (of directory arguments)
|echo||Writes each given STRING to standard output, with a space between|
each and a newline after the last one.
|$ echo ‘HELLO’|
|find||Searches the directory tree rooted at each file name FILE by|
evaluating the EXPRESSION on each file it finds in the tree.
|$ find -iname “HelloWorld.java”|
|grep||Prints lines that contain a match for a pattern||$ grep -r “arjun” *|
|hostname||Prints the name of the current host system. With one argument, it sets|
the current host name to the specified string. You must have appropriate privileges to set the host
$ hostname ‘Arjun’
$ hostname -I
|locate||For each PATTERN given ‘locate’ searches one or more file name|
databases returning each match of PATTERN.
|$ locate *mp3*|
|ls||Lists information about files (of any type, including|
|man||An interface to the on-line reference manuals||$ man|
|mkdir||Creates directories with the specified names||$ mkdir NewDirectory|
|mv||Moves or renames files (or directories).||$ mv file.txt /home/user/samples/|
|nano||GNU ‘nano’ is a small and friendly text editor that comes by default|
|$ nano content.txt|
|ping||Uses the ICMP protocol’s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway.||$ ping ‘www.google.com’|
|pwd||Prints the name of the current directory||$ pwd|
|rm||Removes each given FILE. By default, it does not remove|
|$ rm textfile.txt|
|rmdir||Removes empty directories||$ rmdir NewDirectory|
|sed||sed is a stream editor. In a DOS file you could find \r\n in the end of each line. sed command converts the DOS file format to Unix file format.||$ sed ‘s/.$//’ <filename>|
|shutdown||Shutdown may be used to halt, power-off or reboot the machine.||$ shutdown -h now|
|sort||Sorts, merges, or compares all the lines from the given files, or|
standard input if none are given or for a FILE of ‘-’. By default,
‘sort’ writes the results to standard output.
|$ sort <sample.txt>|
$ sort sample.txt
|ssh||Program for logging into a remote machine and for executing commands on a remote machine. It is intended to provide secure encrypted communications between two untrusted hosts over an insecure network.||$ ssh -l arjun ‘www.google.com’|
|sudo||Allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.||$ sudo rm textfile.txt|
|tar||Tar stores and extracts files from a tape or disk archive.||$ tar -cvf images.tar /home/arjun/images/|
$ tar -xvf images.tar
|touch||Changes the access and/or modification times of the specified|
|$ touch file.txt|
|uname||Prints information about the machine and operating system it is|
|vi||It can be used to edit all kinds of plain text. It is especially useful for|
|$ vi HelloWorld.java|