Introduction to Linux


Contents

Basic commands for your research
Useful Linux commands
Some of the general tips for Linux commands
How to use grep, find , wc, and diff commands
How to extract and archive files
How to use other's Linux...when you do not have your own Linux system.
Troubleshootings


Useful Linux commands

CommandOption(s)Description(s)
ls
This represents "list" and shows the files and directories in the current directory.
-aThis displays all of the files and directories in the directory even hidden files.
-lThis displays all of the information of each file in the directory, such as permission string, owner, group, size, and creation date.
-tThis sorts by the time.

CommandOption(s)Description(s)
rm
This simply deletes indicated file(s), but does not delete any directory.
-rThis option deletes entire directory tree. (e.g. $ rm -r directoryname)
-iThis option prevents from accidental deletion of file by prompting a confirmation.

CommandOption(s)Description(s)
cp
Copy a file in some directory or copy a file in some file in the same directory.

CommandOption(s)Description(s)
mv
Moving files into other directory. Renaming the files.

CommandOption(s)Description(s)
mkdir
This creates a directory. (e.g. $ mkdir newdir)

CommandOption(s)Description(s)
pwd
This shows complete path. No option and file specification needed.

CommandOption(s)Description(s)
rmdir
This command deletes directories specifically. Thus, this does not delete normal files.

CommandOption(s)Description(s)
head
Along with a file name, it displays the first few lines of the text content.

CommandOption(s)Description(s)
tail
Along with a file name, it displays the last few lines of the text content.

CommandOption(s)Description(s)
less
Along with a file name, it displays the entire file in terminal. Use the up or down arrow to read the content. Type "q" or ":q" or "ZZ" to exit.

CommandOption(s)Description(s)
free
This generates a current status of memory use.

CommandOption(s)Description(s)
top
This shows the current CPU use.

CommandOption(s)Description(s)
df
This displays the usage of the drive.

CommandOption(s)Description(s)
cal
This displays the calendar of the current month.
-mThe option specify a month in the same year. (e.g. $ cal -m 5)
-yThe option specify a year. (e.g. $ cal -y 1705)
-d The option specify a month and year. (e.g. $ cal -d 2001-05)

CommandOption(s)Description(s)
cat
This displays the specified text file(s).
-bIt expresses the line numbers except empty lines.
-nIt expresses the line numbers including empty lines.




Back to Electronics Page

Back to Hiro's Physics Main