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
Command | Option(s) | Description(s) |
ls |
| This represents "list" and shows
the files and directories in the current directory. |
| -a | This displays all of the files and
directories in the directory even hidden files. |
| -l | This displays all of the information
of each file in the directory, such as permission string, owner, group, size, and creation date. |
| -t | This sorts by the time. |
Command | Option(s) | Description(s) |
rm |
| This simply deletes
indicated file(s), but does not delete any directory. |
| -r | This option deletes entire directory
tree. (e.g. $ rm -r directoryname) |
| -i | This option prevents from
accidental deletion of file by prompting a confirmation. |
Command | Option(s) | Description(s) |
cp |
| Copy a file in some directory or copy a file in some file in the same directory. |
Command | Option(s) | Description(s) |
mv |
| Moving files into other directory. Renaming the files. |
Command | Option(s) | Description(s) |
mkdir |
| This creates a directory. (e.g. $ mkdir newdir) |
Command | Option(s) | Description(s) |
pwd |
| This shows complete path. No option and
file specification needed. |
Command | Option(s) | Description(s) |
rmdir |
| This command deletes directories specifically.
Thus, this does not delete normal files. |
Command | Option(s) | Description(s) |
head |
| Along with a file name, it displays
the first few lines of the text content. |
Command | Option(s) | Description(s) |
tail |
| Along with a file name, it displays
the last few lines of the text content. |
Command | Option(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. |
Command | Option(s) | Description(s) |
free |
| This generates a current status
of memory use. |
Command | Option(s) | Description(s) |
top |
| This shows the current
CPU use. |
Command | Option(s) | Description(s) |
df |
| This displays the usage
of the drive. |
Command | Option(s) | Description(s) |
cal |
| This displays the calendar of the
current month. |
| -m | The option specify a month in the same year.
(e.g. $ cal -m 5) |
| -y | The option specify a year.
(e.g. $ cal -y 1705) |
| -d | The option specify a month and year.
(e.g. $ cal -d 2001-05) |
Command | Option(s) | Description(s) |
cat |
| This displays the specified text file(s). |
| -b | It expresses the line numbers except empty lines. |
| -n | It expresses the line numbers including empty lines. |
Back to Electronics Page
Back to Hiro's Physics Main