Linux下設定程式可以在當前目錄下執行

2021-09-30 12:39:39 字數 515 閱讀 9585

環境:vmware workstation;centos-6.4-x86_64

說明:

1、設定前:執行程式的時候要使用命令「./程式名」來執行

2、設定後:執行程式的時候使用命令「程式名」來執行

設定步驟:

1、進入到宿主目錄cd:

[negivup@negivup mycode]$ cd

[negivup@negivup ~]$ vim .bash_profile
3、在path中加入**「:.」:

path=$path:$home/bin:.
4、儲存並退出:

:wq
5、使更改立即生效「. .bash_profile」:

[negivup@negivup ~]$ . .bash_profile

Linux下設定網絡卡

linux下設定網絡卡的速率和模式 mii tool f 100basetx fd eth0 把網絡卡eth0設定為100m的全雙工模式 還可以用 ethtool ethtool s eth0 speed 100 duplex full autoneg on 檢視機器上的網絡卡裝置 lspci 檢視...

Linux下設定時間

提供兩種最根本有效的方式,就是更改時區。這裡以更改為國內上海時間例子,其他地方時區同理。備份檔案 mv etc localtime etc localtime.bak 複製時區檔案 cp usr share zoneinfo asia shanghai etc localtime 這裡選擇了亞洲下的...

Linux下設定任務排程

1.編寫乙個簡單的shell命令,生成sh檔案 vi mytask.sh date home yanglei031 aa.txt cp home yanglei031 aa.txt home youyou 2.使用crontab生成任務排程 crontab e 編輯任務排程內容 sh home ya...